diff options
author | Igor Babaev <igor@askmonty.org> | 2011-05-27 20:50:06 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-05-27 20:50:06 -0700 |
commit | 061060eac0351ee35267bae085cc637686e21d6c (patch) | |
tree | db5074c5431b6ce5ea5b98f316547d5eb852e224 /mysql-test/r/innodb_icp.result | |
parent | 42cc59a8c138e9416326b3c4b4f8d64f0bd48728 (diff) | |
download | mariadb-git-061060eac0351ee35267bae085cc637686e21d6c.tar.gz |
Backported the test case for bug 52660 from mysql code line.
Extended the test case to show how MariaDB applies ICP for
indexes with some components defined on the beginning of fields.
Diffstat (limited to 'mysql-test/r/innodb_icp.result')
-rw-r--r-- | mysql-test/r/innodb_icp.result | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result index 42d53f5cfde..8937a9761ff 100644 --- a/mysql-test/r/innodb_icp.result +++ b/mysql-test/r/innodb_icp.result @@ -186,6 +186,45 @@ f1 b DROP TABLE t1; # +# Bug#52660 - "Perf. regr. using ICP for MyISAM on range queries on +# an index containing TEXT" +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +CREATE TABLE t2 (a INT); +INSERT INTO t2 SELECT A.a + 10*(B.a) FROM t1 A, t1 B; +CREATE TABLE t3 ( +c1 TINYTEXT NOT NULL, +i1 INT NOT NULL, +KEY (c1(6),i1) +); +INSERT INTO t3 SELECT CONCAT('c-',1000+t2.a,'=w'), 1 FROM t2; +EXPLAIN +SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 range c1 c1 8 NULL 3 Using where +SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w'; +c1 +c-1004=w +c-1005=w +c-1006=w +EXPLAIN +SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 range c1 c1 12 NULL 2 Using index condition; Using where +SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2; +c1 +EXPLAIN +SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' or i1 > 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 ALL c1 NULL NULL NULL 100 Using where +SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' or i1 > 2; +c1 +c-1004=w +c-1005=w +c-1006=w +DROP TABLE t1, t2, t3; +# # Bug#40992 - InnoDB: Crash when engine_condition_pushdown is on # CREATE TABLE t ( |