diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-12-17 18:39:10 +0100 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-12-17 18:39:10 +0100 |
commit | 7548f142c39d6f7d9a995bd4478c62ef6baa5e19 (patch) | |
tree | dc87d904496dc0919e3aa3f4ea3d6896bd8f3f7a /mysql-test/r | |
parent | ed02cca13ab2446140b47e8756bccc404a66fe6b (diff) | |
download | mariadb-git-7548f142c39d6f7d9a995bd4478c62ef6baa5e19.tar.gz |
BUG#49591, Fixed version string in SHOW CREATE TABLE to accomodate for column list partitioning and new function to_seconds
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/partition_column.result | 16 | ||||
-rw-r--r-- | mysql-test/r/partition_range.result | 37 | ||||
-rw-r--r-- | mysql-test/r/partition_utf8.result | 6 |
3 files changed, 48 insertions, 11 deletions
diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result index 784df3045f0..a64ca8e405d 100644 --- a/mysql-test/r/partition_column.result +++ b/mysql-test/r/partition_column.result @@ -69,7 +69,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(5) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a) +/*!50500 PARTITION BY LIST COLUMNS(a) (PARTITION p0 VALUES IN ('''') ENGINE = MyISAM, PARTITION p1 VALUES IN ('\\') ENGINE = MyISAM, PARTITION p2 VALUES IN ('\0') ENGINE = MyISAM) */ @@ -128,7 +128,7 @@ t1 CREATE TABLE `t1` ( `c` varchar(25) DEFAULT NULL, `d` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE COLUMNS(a,b,c,d) +/*!50500 PARTITION BY RANGE COLUMNS(a,b,c,d) SUBPARTITION BY HASH (to_seconds(d)) SUBPARTITIONS 4 (PARTITION p0 VALUES LESS THAN (1,'0',MAXVALUE,'1900-01-01') ENGINE = MyISAM, @@ -211,7 +211,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a,b) +/*!50500 PARTITION BY LIST COLUMNS(a,b) (PARTITION p0 VALUES IN ((1,NULL),(2,NULL),(NULL,NULL)) ENGINE = MyISAM, PARTITION p1 VALUES IN ((1,1),(2,2)) ENGINE = MyISAM, PARTITION p2 VALUES IN ((3,NULL),(NULL,1)) ENGINE = MyISAM) */ @@ -245,7 +245,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a,b) +/*!50500 PARTITION BY LIST COLUMNS(a,b) (PARTITION p0 VALUES IN ((1,NULL),(2,NULL),(NULL,NULL)) ENGINE = MyISAM, PARTITION p1 VALUES IN ((1,1),(2,2)) ENGINE = MyISAM, PARTITION p2 VALUES IN ((3,NULL),(NULL,1)) ENGINE = MyISAM) */ @@ -299,7 +299,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a) +/*!50500 PARTITION BY LIST COLUMNS(a) (PARTITION p0 VALUES IN (2,1) ENGINE = MyISAM, PARTITION p1 VALUES IN (4,NULL,3) ENGINE = MyISAM) */ insert into t1 values (1); @@ -314,7 +314,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a) +/*!50500 PARTITION BY LIST COLUMNS(a) (PARTITION p0 VALUES IN (2,1) ENGINE = MyISAM, PARTITION p1 VALUES IN (4,NULL,3) ENGINE = MyISAM) */ drop table t1; @@ -349,7 +349,7 @@ t1 CREATE TABLE `t1` ( `c` varchar(5) DEFAULT NULL, `d` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE COLUMNS(a,b,c) +/*!50500 PARTITION BY RANGE COLUMNS(a,b,c) SUBPARTITION BY KEY (c,d) SUBPARTITIONS 3 (PARTITION p0 VALUES LESS THAN (1,'abc','abc') ENGINE = MyISAM, @@ -382,7 +382,7 @@ t1 CREATE TABLE `t1` ( `b` varchar(2) DEFAULT NULL, `c` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE COLUMNS(a,b,c) +/*!50500 PARTITION BY RANGE COLUMNS(a,b,c) (PARTITION p0 VALUES LESS THAN (1,'A',1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1,'B',1) ENGINE = MyISAM) */ insert into t1 values (1, 'A', 1); diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result index 87cb4fba306..0bd7605a5c8 100644 --- a/mysql-test/r/partition_range.result +++ b/mysql-test/r/partition_range.result @@ -1,6 +1,19 @@ drop table if exists t1, t2; create table t1 (a int) partition by range (a) +subpartition by hash(to_seconds(a)) +(partition p0 values less than (1)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50500 PARTITION BY RANGE (a) +SUBPARTITION BY HASH (to_seconds(a)) +(PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM) */ +drop table t1; +create table t1 (a int) +partition by range (a) ( partition p0 values less than (NULL), partition p1 values less than (MAXVALUE)); ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN @@ -30,6 +43,14 @@ id select_type table partitions type possible_keys key key_len ref rows Extra explain partitions select * from t1 where a < '2007-03-07 23:59:59'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` datetime NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50500 PARTITION BY RANGE (TO_SECONDS(a)) +(PARTITION p0 VALUES LESS THAN (63340531200) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN (63342604800) ENGINE = MyISAM) */ drop table t1; create table t1 (a date) partition by range(to_seconds(a)) @@ -53,6 +74,14 @@ select * from t1 where a <= '2005-01-01'; a 2003-12-30 2004-12-31 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50500 PARTITION BY RANGE (to_seconds(a)) +(PARTITION p0 VALUES LESS THAN (63240134400) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN (63271756800) ENGINE = MyISAM) */ drop table t1; create table t1 (a datetime) partition by range(to_seconds(a)) @@ -75,6 +104,14 @@ id select_type table partitions type possible_keys key key_len ref rows Extra select * from t1 where a <= '2005-01-01'; a 2004-01-01 11:59:29 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50500 PARTITION BY RANGE (to_seconds(a)) +(PARTITION p0 VALUES LESS THAN (63240177600) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN (63271800000) ENGINE = MyISAM) */ drop table t1; create table t1 (a int, b char(20)) partition by range columns(a,b) diff --git a/mysql-test/r/partition_utf8.result b/mysql-test/r/partition_utf8.result index 0fae7bb16b6..339871f1f4a 100644 --- a/mysql-test/r/partition_utf8.result +++ b/mysql-test/r/partition_utf8.result @@ -7,7 +7,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(2) CHARACTER SET cp1250 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a) +/*!50500 PARTITION BY LIST COLUMNS(a) (PARTITION p0 VALUES IN (_cp1250 0x81) ENGINE = MyISAM) */ drop table t1; create table t1 (a varchar(2) character set cp1250) @@ -18,7 +18,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(2) CHARACTER SET cp1250 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a) +/*!50500 PARTITION BY LIST COLUMNS(a) (PARTITION p0 VALUES IN ('€') ENGINE = MyISAM) */ drop table t1; create table t1 (a varchar(1500), b varchar(1570)) @@ -45,7 +45,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a) +/*!50500 PARTITION BY LIST COLUMNS(a) (PARTITION p0 VALUES IN ('†') ENGINE = MyISAM, PARTITION p1 VALUES IN ('') ENGINE = MyISAM) */ insert into t1 values (''); |