diff options
author | Andrei Elkin <aelkin@mysql.com> | 2008-11-12 19:51:47 +0200 |
---|---|---|
committer | Andrei Elkin <aelkin@mysql.com> | 2008-11-12 19:51:47 +0200 |
commit | ca2d1846950b07115a001a37d84ce63ab2acdc6c (patch) | |
tree | da19273bb9e832fe232c5251aa3f4d9dc29ee7f0 /mysql-test/t/partition_innodb.test | |
parent | 162e550fcf986454cd1a542e98d8adc8fa81fd00 (diff) | |
parent | 1d521f6c20881997c9162bd11cadcbc77d20520b (diff) | |
download | mariadb-git-ca2d1846950b07115a001a37d84ce63ab2acdc6c.tar.gz |
merging 5.1 -> 5.1 rpl. 3 of 4 conflicts are resolved similarly to 6.0->6.0-rpl merging.
mysql_upgrade results changed due to the error messesge of mysqlcheck has changed.
Diffstat (limited to 'mysql-test/t/partition_innodb.test')
-rw-r--r-- | mysql-test/t/partition_innodb.test | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 932855cc877..c29b3458d19 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -1,6 +1,46 @@ --source include/have_partition.inc --source include/have_innodb.inc +# +# Bug37721: ORDER BY when WHERE contains non-partitioned index column +# wrong order since it did not use pk as second compare +--echo # Bug#37721, test of ORDER BY on PK and WHERE on INDEX +CREATE TABLE t1 ( + a INT, + b INT, + PRIMARY KEY (a), + INDEX (b)) +ENGINE InnoDB +PARTITION BY HASH(a) +PARTITIONS 3; +# This will give the middle partition the highest value +INSERT INTO t1 VALUES (0,0),(4,0),(2,0); +SELECT a FROM t1 WHERE b = 0 ORDER BY a ASC; +SELECT a FROM t1 WHERE b = 0 ORDER BY a DESC; +ALTER TABLE t1 DROP INDEX b; +SELECT a FROM t1 WHERE b = 0 ORDER BY a ASC; +SELECT a FROM t1 WHERE b = 0 ORDER BY a DESC; +DROP TABLE t1; +CREATE TABLE t1 ( + a VARCHAR(600), + b VARCHAR(600), + PRIMARY KEY (a), + INDEX (b)) +ENGINE InnoDB +PARTITION BY KEY(a) +PARTITIONS 3; +# This will give the middle partition the highest value +INSERT INTO t1 VALUES (concat(repeat('MySQL',100),'1'),repeat('0',257)); +INSERT INTO t1 VALUES (concat(repeat('MySQL',100),'3'),repeat('0',257)); +INSERT INTO t1 VALUES (concat(repeat('MySQL',100),'2'),repeat('0',257)); +SELECT right(a,1) FROM t1 WHERE b = repeat('0',257) ORDER BY a ASC; +SELECT right(a,1) FROM t1 WHERE b = repeat('0',257) ORDER BY a DESC; +ALTER TABLE t1 DROP INDEX b; +SELECT right(a,1) FROM t1 WHERE b = repeat('0',257) ORDER BY a ASC; +SELECT right(a,1) FROM t1 WHERE b = repeat('0',257) ORDER BY a DESC; +DROP TABLE t1; + +# # Bug#32948 - FKs allowed to reference partitioned table # -- echo # Bug#32948 |