diff options
author | unknown <ingo@mysql.com> | 2005-02-11 11:59:35 +0100 |
---|---|---|
committer | unknown <ingo@mysql.com> | 2005-02-11 11:59:35 +0100 |
commit | 72750ad95ac45e12bedce010cf44e14e2c4f63ea (patch) | |
tree | d73fcf1368fb2dea3f7313a842fda03a076166ab /mysql-test | |
parent | 6520c161cf4d8f80a7701841e8e94ee53b95f6ed (diff) | |
parent | 53596fa16f4387fa6b0101ab18fb9af24d3163b7 (diff) | |
download | mariadb-git-72750ad95ac45e12bedce010cf44e14e2c4f63ea.tar.gz |
Merge
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/triggers/post-commit:
Auto merged
include/my_pthread.h:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/item.cc:
Auto merged
sql/log.cc:
Auto merged
sql/table.cc:
SCCS merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/select.result | 13 | ||||
-rw-r--r-- | mysql-test/t/select.test | 15 |
2 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index b72754d3374..06b72b993ff 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2388,3 +2388,16 @@ WART 0100 1 WART 0200 1 WART 0300 3 DROP TABLE t1; +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; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +1 SIMPLE t2 ref a a 23 test.t1.a 2 +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +1 SIMPLE t2 ref a a 23 test.t1.a 2 +DROP TABLE t1, t2; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index a32b9d06ef9..13b3e792055 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -1970,3 +1970,18 @@ SELECT K2C4, K4N4, F2I4 FROM t1 WHERE K2C4 = 'WART' AND (K2C4 = 'WART' OR K4N4 = '0200'); 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; |