Not the answer you need?
Register and ask your own question!

MySQL 5.5: can't discard tablespaces for partitioned tables?

j4nd3r53nj4nd3r53n ContributorCurrent User Role Novice
Server version: 5.5.62-38.14 Percona Server (GPL), Release 38.14, Revision 7e0e1cc

I have a number of partitioned tables in a backup - eg:
--
-- Table structure for table `alchemy_spin_result`
-- Created with MySQL Version 5.5.57
--

CREATE TABLE `alchemy_spin_result` (
  `id` bigint(20) unsigned NOT NULL,
  `game_instance_id` bigint(20) NOT NULL,
  `created_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `won_feature` tinyint(1) NOT NULL,
  `game_data` varchar(255) DEFAULT NULL,
  `win_limit` int(11) NOT NULL,
  `won_jackpot` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`,`created_timestamp`),
  KEY `ALSPRSLT_FK01` (`game_instance_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!50100  PARTITION BY RANGE ( UNIX_TIMESTAMP(created_timestamp))
(PARTITION pMIN VALUES LESS THAN (0) ENGINE = InnoDB,
 PARTITION p2015_03 VALUES LESS THAN (1427846400) ENGINE = InnoDB,
 PARTITION p2015_04 VALUES LESS THAN (1430438400) ENGINE = InnoDB,
 PARTITION p2015_05 VALUES LESS THAN (1433116800) ENGINE = InnoDB,
 PARTITION p2015_06 VALUES LESS THAN (1435708800) ENGINE = InnoDB,
 PARTITION p2015_07 VALUES LESS THAN (1438387200) ENGINE = InnoDB,
 PARTITION p2015_08 VALUES LESS THAN (1441065600) ENGINE = InnoDB,
 PARTITION p2015_09 VALUES LESS THAN (1443657600) ENGINE = InnoDB,
 PARTITION p2015_10 VALUES LESS THAN (1446336000) ENGINE = InnoDB,
 PARTITION p2015_11 VALUES LESS THAN (1448928000) ENGINE = InnoDB,
 PARTITION p2015_12 VALUES LESS THAN (1451606400) ENGINE = InnoDB,
 PARTITION pMAX VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;


I need to restore a backup of this table, in the process of which I have to discard the tablespace:
mysql> alter table alchemy_spin_result discard tablespace;
ERROR 1031 (HY000): Table storage engine for 'alchemy_spin_result' doesn't have this option

It is the same for importing tablespaces, and for all my partitioned tables. Is this really not possible?
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.