summaryrefslogtreecommitdiff
path: root/mysql-test/r/myisam_icp.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-11-04 05:39:45 -0700
committerIgor Babaev <igor@askmonty.org>2011-11-04 05:39:45 -0700
commit928e94fb98b34e511d89c1ca38e35b42656c9313 (patch)
tree74863e1e60120f9bd64a67ecbe9308b930bef86d /mysql-test/r/myisam_icp.result
parentc1ebb566b36df00ad21a8b9d35ab6ad9de5e0b5b (diff)
downloadmariadb-git-928e94fb98b34e511d89c1ca38e35b42656c9313.tar.gz
Fixed LP bug #885168.
The call of the virtual function cancel_pushed_idx_cond in the code of the function test_if_skip_sort_order was misplaced when backporting the fix for bug 58816.
Diffstat (limited to 'mysql-test/r/myisam_icp.result')
-rw-r--r--mysql-test/r/myisam_icp.result32
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result
index e31fba49eae..ede9db91442 100644
--- a/mysql-test/r/myisam_icp.result
+++ b/mysql-test/r/myisam_icp.result
@@ -627,6 +627,38 @@ FROM t3 JOIN t4 ON t4.f11 = t3.f10
f11 f10
DROP TABLE t1,t2,t3,t4;
set optimizer_switch= @tmp_778434;
+#
+# Bug#885168: ICP for one index + potential ORDER BY for another
+#
+CREATE TABLE t1 (a varchar(64), b varchar(10), INDEX(a), INDEX(b)) ;
+INSERT INTO t1 VALUES
+('Ohio','Iowa'), ('k','d'), ('bdkpj','mbdkpjdanp'), ('d','xdmbdkpjda'),
+('fkxdmbdkpjdanpje','o'), ('f','Pennsylvan'), ('Virginia','ei');
+SET SESSION optimizer_switch='index_condition_pushdown=off';
+EXPLAIN
+SELECT * FROM t1
+WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
+ ORDER BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range b b 13 NULL 2 Using where; Rowid-ordered scan; Using filesort
+SELECT * FROM t1
+WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
+ ORDER BY a;
+a b
+d xdmbdkpjda
+SET SESSION optimizer_switch='index_condition_pushdown=on';
+EXPLAIN
+SELECT * FROM t1
+WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
+ ORDER BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range b b 13 NULL 2 Using index condition; Rowid-ordered scan; Using filesort
+SELECT * FROM t1
+WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
+ ORDER BY a;
+a b
+d xdmbdkpjda
+DROP TABLE t1;
drop table if exists t0, t1, t1i, t1m;
#
# BUG#826935 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed