summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-02-10 22:17:18 -0800
committerunknown <igor@rurik.mysql.com>2005-02-10 22:17:18 -0800
commitdca07cf034b9fbaa6aae74d63afefdcdb9c4f51f (patch)
tree4b07389b0861bdad7092a4a50ec3dcece53fe802 /mysql-test/t/select.test
parent37e2873fe38db47548ecac5bd3afaac23b8791be (diff)
parent954094562473aad37baf40f97df2a8787eca6f1c (diff)
downloadmariadb-git-dca07cf034b9fbaa6aae74d63afefdcdb9c4f51f.tar.gz
Merge rurik.mysql.com:/home/igor/dev/mysql-4.0-0
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0 BitKeeper/etc/logging_ok: auto-union extra/replace.c: Auto merged mysql-test/r/select.result: Auto merged mysql-test/t/select.test: Auto merged sql/table.cc: Auto merged
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r--mysql-test/t/select.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 9bbd26a9c1c..c00395d95e7 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1930,3 +1930,18 @@ INSERT INTO t1 VALUES (3,'c');
EXPLAIN SELECT i FROM t1 WHERE i=1;
DROP TABLE t1;
+
+#
+# Test case for bug 7520: a wrong cost of the index for a BLOB field
+#
+
+CREATE TABLE t1 ( a BLOB, INDEX (a(20)) );
+CREATE TABLE t2 ( a BLOB, INDEX (a(20)) );
+
+INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five');
+INSERT INTO t2 VALUES ('one'),('two'),('three'),('four'),('five');
+
+EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a;
+EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;
+
+DROP TABLE t1, t2;