summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorsergefp@mysql.com <>2003-11-28 00:31:15 +0300
committersergefp@mysql.com <>2003-11-28 00:31:15 +0300
commitae159473606bb7e7c2792e9b97ccb384295909a1 (patch)
tree8be594c52c3b9dee4134f86f8e9c186157e29d99 /mysql-test
parentd8603604e84ade0a07a95188643a68855e2f6ca1 (diff)
downloadmariadb-git-ae159473606bb7e7c2792e9b97ccb384295909a1.tar.gz
Fix for bug 1974
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/index_merge.result5
-rw-r--r--mysql-test/t/index_merge.test4
2 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/index_merge.result b/mysql-test/r/index_merge.result
index 5b0c2ffd7a2..63a0ebc4086 100644
--- a/mysql-test/r/index_merge.result
+++ b/mysql-test/r/index_merge.result
@@ -270,6 +270,11 @@ explain select * from t0,t1 where t0.key1 = 5 and
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ref i1 i1 4 const 1 Using where
1 SIMPLE t1 index_merge i1,i8 i1,i8 4,4 NULL 2 Using where
+explain select * from t0,t1 where t0.key1 < 3 and
+(t1.key1 = t0.key1 or t1.key8 = t0.key1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 range i1 i1 4 NULL 3 Using where
+1 SIMPLE t1 ALL i1,i8 NULL NULL NULL 1024 Range checked for each record (index map: 0x81)
explain select * from t1 where key1=3 or key2=4
union select * from t1 where key1<4 or key3=5;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/t/index_merge.test b/mysql-test/t/index_merge.test
index 793ae848c52..79eda7c1f56 100644
--- a/mysql-test/t/index_merge.test
+++ b/mysql-test/t/index_merge.test
@@ -237,6 +237,10 @@ select * from t0,t1 where (t0.key1=t1.key1) and
explain select * from t0,t1 where t0.key1 = 5 and
(t1.key1 = t0.key1 or t1.key8 = t0.key1);
+# Fix for bug#1974
+explain select * from t0,t1 where t0.key1 < 3 and
+ (t1.key1 = t0.key1 or t1.key8 = t0.key1);
+
# index_merge inside union
explain select * from t1 where key1=3 or key2=4
union select * from t1 where key1<4 or key3=5;