diff options
author | Mattias Jonsson <mattias.jonsson@oracle.com> | 2012-03-14 21:57:15 +0100 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@oracle.com> | 2012-03-14 21:57:15 +0100 |
commit | aaf0e5d6041ac7f5ab3ff3c144b2cb367521053c (patch) | |
tree | 10a82396cfad57ec63fcf6272baf35e13af994e3 /mysql-test/t/partition_innodb.test | |
parent | cfea7c7dfc00821b1c39a9f8024d60fb337b7ab3 (diff) | |
parent | f8eb62625f69086a3094ade6d90c337e00c3c8ca (diff) | |
download | mariadb-git-aaf0e5d6041ac7f5ab3ff3c144b2cb367521053c.tar.gz |
merge of bug#1364811 into mysql-5.5
Diffstat (limited to 'mysql-test/t/partition_innodb.test')
-rw-r--r-- | mysql-test/t/partition_innodb.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index cd371a8f79a..ceb06cb2f12 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -9,6 +9,35 @@ drop table if exists t1, t2; let $MYSQLD_DATADIR= `SELECT @@datadir`; --echo # +--echo # Bug#13694811: THE OPTIMIZER WRONGLY USES THE FIRST +--echo # INNODB PARTITION STATISTICS +--echo # + +CREATE TABLE t1 +(a INT, + b varchar(64), + PRIMARY KEY (a), + KEY (b)) +ENGINE = InnoDB +PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) SUBPARTITIONS 10 +(PARTITION pNeg VALUES LESS THAN (0), + PARTITION p0 VALUES LESS THAN (1000), + PARTITION pMAX VALUES LESS THAN MAXVALUE); + +--echo # Only one row in the first 10 subpartitions +INSERT INTO t1 VALUES (-1, 'Only negative pk value'); + +INSERT INTO t1 VALUES (0, 'Mod Zero'), (1, 'One'), (2, 'Two'), (3, 'Three'), +(10, 'Zero'), (11, 'Mod One'), (12, 'Mod Two'), (13, 'Mod Three'), +(20, '0'), (21, '1'), (22, '2'), (23, '3'), +(4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9'); +INSERT INTO t1 SELECT a + 30, b FROM t1 WHERE a >= 0; +ANALYZE TABLE t1; +EXPLAIN SELECT b FROM t1 WHERE b between 'L' and 'N' AND a > -100; +DROP TABLE t1; + +--echo # --echo # Bug#56287: crash when using Partition datetime in sub in query --echo # |