summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-03-26 16:52:52 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-03-26 16:52:52 +0300
commit6e93d2939df73eceb8b39e0c2e08e96fb4c764d2 (patch)
tree62b746c42cc9edf60ff8bebaa97c3c85f4b3a831 /mysql-test
parentec5051fff447914216c87378930d6234735da3a7 (diff)
downloadmariadb-git-6e93d2939df73eceb8b39e0c2e08e96fb4c764d2.tar.gz
WL3527: 5.0 part:
enabled the optional FOR JOIN to all the three clauses : USE, FORCE and IGNORE mysql-test/r/select.result: WL3527: 5.0 part: test cases mysql-test/t/select.test: WL3527: 5.0 part: test cases
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/select.result6
-rw-r--r--mysql-test/t/select.test2
2 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 31d15981d93..b501d547e0a 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -3636,6 +3636,12 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN SELECT 1 FROM t1 IGNORE INDEX FOR JOIN (a) WHERE a = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
+EXPLAIN SELECT 1 FROM t1 USE INDEX FOR JOIN (a) WHERE a = 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref a a 5 const 1 Using where; Using index
+EXPLAIN SELECT 1 FROM t1 FORCE INDEX FOR JOIN (a) WHERE a = 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref a a 5 const 1 Using where; Using index
DROP TABLE t1;
CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
CREATE TABLE t2 ( f11 int PRIMARY KEY );
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 883ea7bf0b0..c5c7d07ee25 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -3111,6 +3111,8 @@ DROP TABLE t1,t2,t3;
CREATE TABLE t1 (a INT, b INT, KEY (a)); INSERT INTO t1 VALUES (1,1),(2,2);
EXPLAIN SELECT 1 FROM t1 WHERE a = 1;
EXPLAIN SELECT 1 FROM t1 IGNORE INDEX FOR JOIN (a) WHERE a = 1;
+EXPLAIN SELECT 1 FROM t1 USE INDEX FOR JOIN (a) WHERE a = 1;
+EXPLAIN SELECT 1 FROM t1 FORCE INDEX FOR JOIN (a) WHERE a = 1;
DROP TABLE t1;
#