diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2011-01-14 00:15:44 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2011-01-14 00:15:44 +0300 |
commit | e43c7a2ff5cd0bbd8881dc720622a292cfdc9045 (patch) | |
tree | ca281973faaf8e441eba245c09c61b62437c0f40 /mysql-test/t/index_merge_innodb.test | |
parent | 26599d9260c2faceb5657bd54e2e04776cdd3047 (diff) | |
download | mariadb-git-e43c7a2ff5cd0bbd8881dc720622a292cfdc9045.tar.gz |
Testcase Backport: BUG#48093: 6.0 Server not processing equivalent IN clauses properly
Diffstat (limited to 'mysql-test/t/index_merge_innodb.test')
-rw-r--r-- | mysql-test/t/index_merge_innodb.test | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/t/index_merge_innodb.test b/mysql-test/t/index_merge_innodb.test index 7c6ffaace4f..77c3e284634 100644 --- a/mysql-test/t/index_merge_innodb.test +++ b/mysql-test/t/index_merge_innodb.test @@ -84,3 +84,37 @@ SELECT COUNT(*) FROM WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; DROP TABLE t1; + +--echo # +--echo # Testcase Backport: BUG#48093: 6.0 Server not processing equivalent IN clauses properly +--echo # with Innodb tables +--echo # + +CREATE TABLE t1 ( + i int(11) DEFAULT NULL, + v1 varchar(1) DEFAULT NULL, + v2 varchar(20) DEFAULT NULL, + KEY i (i), + KEY v (v1,i) +) ENGINE=innodb; + +INSERT INTO t1 VALUES (1,'f','no'); +INSERT INTO t1 VALUES (2,'u','yes-u'); +INSERT INTO t1 VALUES (2,'h','yes-h'); +INSERT INTO t1 VALUES (3,'d','no'); + +--echo +SELECT v2 +FROM t1 +WHERE v1 IN ('f', 'd', 'h', 'u' ) AND i = 2; + +--echo +--echo # Should not use index_merge +EXPLAIN +SELECT v2 +FROM t1 +WHERE v1 IN ('f', 'd', 'h', 'u' ) AND i = 2; + +DROP TABLE t1; + + |