summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-01-09 22:42:31 +0200
committermonty@mashka.mysql.fi <>2003-01-09 22:42:31 +0200
commitbf683af4cea9a9efc3e524d5aabde4886e93540f (patch)
treef816bf52a43930fec89dbe67f90d81dd28b28a78 /mysql-test
parentf8e660d88ca64d2f7a1be58acbe57d777d20b122 (diff)
downloadmariadb-git-bf683af4cea9a9efc3e524d5aabde4886e93540f.tar.gz
Post merge fix
Allow empty key list in USE|IGNORE|FORCE INDEX()
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/myisam.result44
-rw-r--r--mysql-test/t/myisam.test2
2 files changed, 27 insertions, 19 deletions
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 3d4b1dbd46d..23610be36c4 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -332,29 +332,35 @@ t1 1 a 2 b A 5 NULL NULL YES BTREE
t1 1 c_2 1 c A 5 NULL NULL YES BTREE
t1 1 c_2 2 a A 5 NULL NULL BTREE
explain select * from t1,t2 where t1.a=t2.a;
-table type possible_keys key key_len ref rows Extra
-t1 ALL a NULL NULL NULL 5
-t2 ALL a NULL NULL NULL 2 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL a NULL NULL NULL 5
+1 SIMPLE t2 ALL a NULL NULL NULL 2 Using where
explain select * from t1,t2 force index(a) where t1.a=t2.a;
-table type possible_keys key key_len ref rows Extra
-t2 ALL a NULL NULL NULL 2
-t1 ALL a NULL NULL NULL 5 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL a NULL NULL NULL 2
+1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where
explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a;
-table type possible_keys key key_len ref rows Extra
-t2 ALL a NULL NULL NULL 2
-t1 ref a a 4 t2.a 3
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL a NULL NULL NULL 2
+1 SIMPLE t1 ref a a 4 t2.a 3
explain select * from t1,t2 where t1.b=t2.b;
-table type possible_keys key key_len ref rows Extra
-t2 ALL b NULL NULL NULL 2
-t1 ref b b 5 t2.b 1 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL b NULL NULL NULL 2
+1 SIMPLE t1 ref b b 5 t2.b 1 Using where
explain select * from t1,t2 force index(c) where t1.a=t2.a;
-table type possible_keys key key_len ref rows Extra
-t1 ALL a NULL NULL NULL 5
-t2 ALL NULL NULL NULL NULL 2 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL a NULL NULL NULL 5
+1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
explain select * from t1 where a=0 or a=2;
-table type possible_keys key key_len ref rows Extra
-t1 ALL a NULL NULL NULL 5 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where
explain select * from t1 force index (a) where a=0 or a=2;
-table type possible_keys key key_len ref rows Extra
-t1 range a a 4 NULL 4 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 4 NULL 4 Using where
+explain select * from t1 where c=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref c,c_2 c 5 const 1 Using where
+explain select * from t1 use index() where c=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
drop table t1,t2;
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 7b541d98cef..ed08b1cbacb 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -349,4 +349,6 @@ explain select * from t1,t2 where t1.b=t2.b;
explain select * from t1,t2 force index(c) where t1.a=t2.a;
explain select * from t1 where a=0 or a=2;
explain select * from t1 force index (a) where a=0 or a=2;
+explain select * from t1 where c=1;
+explain select * from t1 use index() where c=1;
drop table t1,t2;