use test; SELECT * FROM t_10; a b 1 One 3 Three 5 Five 9 Nine SELECT * FROM t_100; a b 11 Eleven 13 Thirdteen 15 Fifeteen 19 Nineteen 91 Ninety-one 93 Ninety-three 95 Ninety-five 99 Ninety-nine SELECT * FROM t_1000; a b 111 Hundred elven 113 Hundred thirdteen 115 Hundred fiveteen 119 Hundred nineteen 131 Hundred thirty-one 133 Hundred thirty-three 135 Hundred thirty-five 139 Hundred thirty-nine 151 Hundred fifty-one 153 Hundred fifty-three 155 Hundred fity-five 159 Hundred fifty-nine 191 Hundred ninety-one 193 Hundred ninety-three 195 Hundred ninety-five 199 Hundred ninety-nine SELECT * FROM tp; a b 112 Hundred twelve 114 Hundred fourteen 116 Hundred sixteen 118 Hundred eightteen 12 twelve 122 Hundred twenty-two 124 Hundred twenty-four 126 Hundred twenty-six 128 Hundred twenty-eight 14 Fourteen 16 Sixteen 162 Hundred sixty-two 164 Hundred sixty-four 166 Hundred sixty-six 168 Hundred sixty-eight 18 Eightteen 182 Hundred eighty-two 184 Hundred eighty-four 186 Hundred eighty-six 188 Hundred eighty-eight 2 Two 4 Four 6 Six 8 Eight SELECT * FROM tsp; a b 112 Hundred twelve 114 Hundred fourteen 116 Hundred sixteen 118 Hundred eightteen 12 twelve 122 Hundred twenty-two 124 Hundred twenty-four 126 Hundred twenty-six 128 Hundred twenty-eight 14 Fourteen 16 Sixteen 162 Hundred sixty-two 164 Hundred sixty-four 166 Hundred sixty-six 168 Hundred sixty-eight 18 Eightteen 182 Hundred eight-two 184 Hundred eighty-four 186 Hundred eighty-six 188 Hundred eighty-eight 2 Two 4 Four 6 Six 8 Eight SELECT * FROM tsp_00; a b 5 Five SELECT * FROM tsp_01; a b 1 One SELECT * FROM tsp_02; a b SELECT * FROM tsp_03; a b 3 Three SELECT * FROM tsp_04; a b 9 Nine CREATE INDEX id_t_10_b USING BTREE ON t_10 (b); ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; ERROR HY000: Tables have different definitions CREATE INDEX id_tp_b USING BTREE ON tp (b); ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; ERROR HY000: Tables have different definitions DROP INDEX id_t_10_b ON t_10; DROP INDEX id_tp_b ON tp; ALTER TABLE t_10 ADD UNIQUE INDEX USING BTREE (a); ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; ERROR HY000: Tables have different definitions ALTER TABLE tp ADD UNIQUE INDEX USING BTREE (a); ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; show create table t_10; Table Create Table t_10 CREATE TABLE `t_10` ( `a` int(11) NOT NULL, `b` varchar(55) DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `a` (`a`) USING BTREE ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show create table tp ; Table Create Table tp CREATE TABLE `tp` ( `a` int(11) NOT NULL, `b` varchar(55) DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `a` (`a`) USING BTREE ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (`a`) (PARTITION `p0` VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION `p1` VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION `p2` VALUES LESS THAN (1000) ENGINE = MyISAM) ALTER TABLE tp DROP INDEX a; ALTER TABLE t_10 DROP INDEX a; ALTER TABLE tp ADD UNIQUE INDEX USING BTREE (a,b); ALTER TABLE t_10 ADD UNIQUE INDEX USING BTREE (a,b); ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; show create table t_10; Table Create Table t_10 CREATE TABLE `t_10` ( `a` int(11) NOT NULL, `b` varchar(55) DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `a` (`a`,`b`) USING BTREE ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show create table tp ; Table Create Table tp CREATE TABLE `tp` ( `a` int(11) NOT NULL, `b` varchar(55) DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `a` (`a`,`b`) USING BTREE ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (`a`) (PARTITION `p0` VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION `p1` VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION `p2` VALUES LESS THAN (1000) ENGINE = MyISAM) DROP TABLE IF EXISTS t_10; DROP TABLE IF EXISTS t_100; DROP TABLE IF EXISTS t_1000; DROP TABLE IF EXISTS tp; DROP TABLE IF EXISTS tsp; DROP TABLE IF EXISTS tsp_00; DROP TABLE IF EXISTS tsp_01; DROP TABLE IF EXISTS tsp_02; DROP TABLE IF EXISTS tsp_03; DROP TABLE IF EXISTS tsp_04; DROP TABLE IF EXISTS t_empty; DROP TABLE IF EXISTS t_null;