summaryrefslogtreecommitdiff
path: root/mysql-test/r/innodb_icp.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/innodb_icp.result')
-rw-r--r--mysql-test/r/innodb_icp.result27
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result
index 54ad9ecafad..07c75986392 100644
--- a/mysql-test/r/innodb_icp.result
+++ b/mysql-test/r/innodb_icp.result
@@ -852,6 +852,33 @@ select 1 from t1 where b <= 1 and a <> '';
1
drop table t1;
#
+# MDEV-4778: Incorrect results from Aria/MyISAM SELECT using index with prefix length on TEXT column
+#
+CREATE TABLE t1 (
+c1 TEXT ,
+c2 VARCHAR(2) ,
+INDEX idx1 (c2,c1(2)),
+INDEX idx2 (c2,c1(1))
+);
+INSERT INTO t1 (c1,c2) VALUES ('aa','x'), ('a' ,'y');
+SELECT * FROM t1 IGNORE INDEX(idx1,idx2) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
+c1 c2
+aa x
+a y
+EXPLAIN
+SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range idx1 idx1 10 NULL 2 Using index condition; Using where
+SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
+c1 c2
+aa x
+a y
+SELECT * FROM t1 FORCE INDEX(idx2) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
+c1 c2
+aa x
+a y
+DROP TABLE t1;
+#
# BUG#920132: Assert trx->n_active_thrs == 1 failed at que0que.c line 1050
#
CREATE TABLE t1 ( a INT )