diff options
author | Mattias Jonsson <mattias.jonsson@oracle.com> | 2013-02-14 17:03:49 +0100 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@oracle.com> | 2013-02-14 17:03:49 +0100 |
commit | e96182824dd85a1a77fcf58d293d17451d003135 (patch) | |
tree | a15708b55ecdb842e6b0718e81f7ef56b4dbd8f0 /mysql-test/r/partition.result | |
parent | 84ef847056d367f5e88d1ff6d74cd8dcce0c3e0c (diff) | |
download | mariadb-git-e96182824dd85a1a77fcf58d293d17451d003135.tar.gz |
Bug#16274455: CAN NOT ACESS PARTITIONED TABLES WHEN
DOWNGRADED FROM 5.6.11 TO 5.6.10
Problem was new syntax not accepted by previous version.
Fixed by adding version comment of /*!50531 around the
new syntax.
Like this in the .frm file:
'PARTITION BY KEY /*!50611 ALGORITHM = 2 */ () PARTITIONS 3'
and also changing the output from SHOW CREATE TABLE to:
CREATE TABLE t1 (a INT)
/*!50100 PARTITION BY KEY */ /*!50611 ALGORITHM = 1 */ /*!50100 ()
PARTITIONS 3 */
It will always add the ALGORITHM into the .frm for KEY [sub]partitioned
tables, but for SHOW CREATE TABLE it will only add it in case it is the non
default ALGORITHM = 1.
Also notice that for 5.5, it will say /*!50531 instead of /*!50611, which
will make upgrade from 5.5 > 5.5.31 to 5.6 < 5.6.11 fail!
If one downgrades an fixed version to the same major version (5.5 or 5.6) the
bug 14521864 will be visible again, but unless the .frm is updated, it will
work again when upgrading again.
Also fixed so that the .frm does not get updated version
if a single partition check passes.
Diffstat (limited to 'mysql-test/r/partition.result')
-rw-r--r-- | mysql-test/r/partition.result | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index dbc212a0222..af90387c6b6 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -81,7 +81,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) PARTITIONS 2 */ SELECT * FROM t1; a b @@ -175,7 +175,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`ID`,`aaaa,aaaaa`,`ddddddddd`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (ID) -SUBPARTITION BY LINEAR KEY ALGORITHM = 2 (ID,`aaaa,aaaaa`) +SUBPARTITION BY LINEAR KEY (ID,`aaaa,aaaaa`) SUBPARTITIONS 2 (PARTITION p01 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION p11 VALUES LESS THAN (200) ENGINE = MyISAM, @@ -722,7 +722,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) -SUBPARTITION BY KEY ALGORITHM = 2 (a) +SUBPARTITION BY KEY (a) (PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (2) ENGINE = MyISAM) */ alter table t1 reorganize partition p1 into (partition p1 values less than (3)); @@ -732,7 +732,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) -SUBPARTITION BY KEY ALGORITHM = 2 (a) +SUBPARTITION BY KEY (a) (PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (3) ENGINE = MyISAM) */ drop table t1; @@ -753,7 +753,7 @@ t1 CREATE TABLE `t1` ( `c` int(11) NOT NULL, PRIMARY KEY (`a`,`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) */ +/*!50100 PARTITION BY KEY (a) */ drop table t1; CREATE TABLE t1 ( a int not null, @@ -1074,7 +1074,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MyISAM, PARTITION p1 ENGINE = MyISAM) */ alter table t1; @@ -1083,7 +1083,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MyISAM, PARTITION p1 ENGINE = MyISAM) */ alter table t1 engine=myisam; @@ -1092,7 +1092,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MyISAM, PARTITION p1 ENGINE = MyISAM) */ alter table t1 engine=heap; @@ -1101,7 +1101,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MEMORY, PARTITION p1 ENGINE = MEMORY) */ alter table t1 remove partitioning; @@ -1121,7 +1121,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MyISAM, PARTITION p1 ENGINE = MyISAM) */ alter table t1 add column b int remove partitioning; @@ -1141,7 +1141,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MyISAM, PARTITION p1 ENGINE = MyISAM) */ alter table t1 @@ -1154,7 +1154,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MEMORY, PARTITION p1 ENGINE = MEMORY) */ alter table t1 engine=myisam, add column c int remove partitioning; @@ -1176,7 +1176,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MEMORY, PARTITION p1 ENGINE = MEMORY) */ alter table t1 @@ -1189,7 +1189,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MEMORY, PARTITION p1 ENGINE = MEMORY) */ alter table t1 @@ -1203,7 +1203,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MEMORY, PARTITION p1 ENGINE = MEMORY) */ alter table t1 @@ -1373,14 +1373,14 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) */ +/*!50100 PARTITION BY KEY (a) */ alter table t1 add partition (partition p1); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MyISAM, PARTITION p1 ENGINE = MyISAM) */ drop table t1; @@ -1480,7 +1480,7 @@ t2 CREATE TABLE `t2` ( `c` char(10) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='no comment' -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) */ +/*!50100 PARTITION BY KEY (a) */ drop table t2; create table t1 (f1 int) partition by hash (f1) as select 1; drop table t1; @@ -1715,7 +1715,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) (PARTITION p0) */ set session sql_mode=''; drop table t1; @@ -1731,7 +1731,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) */ +/*!50100 PARTITION BY KEY (a) */ drop table t1; CREATE TABLE t1 (a int) ENGINE = MYISAM PARTITION BY KEY(a); INSERT into t1 values (1), (2); @@ -1804,7 +1804,7 @@ t1 CREATE TABLE `t1` ( `a` bigint(20) unsigned NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY ALGORITHM = 2 (a) +/*!50100 PARTITION BY KEY (a) PARTITIONS 10 */ insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612); |