summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
authortimour@mysql.com <>2004-11-25 11:37:28 +0200
committertimour@mysql.com <>2004-11-25 11:37:28 +0200
commit38ab93c6befaca29e2fc36f0f24ce2d1e464550b (patch)
tree29ad0385fdb639f58ab052e5bb498f9429a374d9 /mysql-test/t/select.test
parent5eae363c329978a8d87cadc76a1a4967f38a7d70 (diff)
parentcf722bc3f5040d447f657477485e362b967d1f3e (diff)
downloadmariadb-git-38ab93c6befaca29e2fc36f0f24ce2d1e464550b.tar.gz
Merge for BUG#3759 which was missing from the main tree for some reason.
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r--mysql-test/t/select.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 11b3ae6aed1..f897703789b 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1887,4 +1887,25 @@ explain select * from t1 left join t2 on a=c where d in (4);
select * from t1 left join t2 on a=c where d in (4);
explain select * from t1 left join t2 on a=c where d = 4;
select * from t1 left join t2 on a=c where d = 4;
-drop table t1, t2; \ No newline at end of file
+drop table t1, t2;R
+
+#
+# Covering index is mentioned in EXPLAIN output for const tables (bug #5333)
+#
+
+CREATE TABLE t1 (
+ i int(11) NOT NULL default '0',
+ c char(10) NOT NULL default '',
+ PRIMARY KEY (i),
+ UNIQUE KEY c (c)
+) TYPE=MyISAM;
+
+INSERT INTO t1 VALUES (1,'a');
+INSERT INTO t1 VALUES (2,'b');
+INSERT INTO t1 VALUES (3,'c');
+
+EXPLAIN SELECT i FROM t1 WHERE i=1;
+
+EXPLAIN SELECT i FROM t1 WHERE i=1;
+
+DROP TABLE t1;