diff options
author | Igor Babaev <igor@askmonty.org> | 2011-01-06 11:40:01 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-01-06 11:40:01 -0800 |
commit | ed2405788fad64d68d54bc41b508c24c60b4eecd (patch) | |
tree | fa376f614cd7e483cf5cb731271d1eef11ddcbeb /mysql-test/t/join_cache.test | |
parent | 85523738b95abd7bc4f3b97d3c0385af0a3642a1 (diff) | |
parent | cb4fa7f401267bf887066100726c53f10b712e6d (diff) | |
download | mariadb-git-ed2405788fad64d68d54bc41b508c24c60b4eecd.tar.gz |
Fixed vargrind problems in check_join_cache_usage().
Merged the patch for bug 697557. Adjusted the results.
Diffstat (limited to 'mysql-test/t/join_cache.test')
-rw-r--r-- | mysql-test/t/join_cache.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/join_cache.test b/mysql-test/t/join_cache.test index ab9e10536e1..9892d2cf5be 100644 --- a/mysql-test/t/join_cache.test +++ b/mysql-test/t/join_cache.test @@ -2931,6 +2931,28 @@ SET SESSION join_cache_level = DEFAULT; DROP TABLE t1,t2; +--echo # +--echo # Bug #697557: hash join on a varchar field +--echo # + +CREATE TABLE t1 ( f1 varchar(10) , f2 int(11) , KEY (f1)); +INSERT INTO t1 VALUES ('r',1), ('m',2); + +CREATE TABLE t2 ( f1 varchar(10) , f2 int(11) , KEY (f1)); +INSERT INTO t2 VALUES + ('hgtofubn',1), ('GDOXZ',91), ('n',2), ('fggxgalh',88), + ('hgtofu',1), ('GDO',101), ('n',3), ('fggxga',55), + ('hgtofu',3), ('GDO',33), ('nn',3), ('fggxgarrr',77); + +SET SESSION join_cache_level=3; +EXPLAIN +SELECT * FROM t1,t2 WHERE t2.f1 = t1.f1; +SELECT * FROM t1,t2 WHERE t2.f1 = t1.f1; + +SET SESSION join_cache_level = DEFAULT; + +DROP TABLE t1,t2; + # this must be the last command in the file set @@optimizer_switch=@save_optimizer_switch; |