diff options
author | Igor Babaev <igor@askmonty.org> | 2011-02-27 22:37:46 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-02-27 22:37:46 -0800 |
commit | 0f0360e21f45ad9704c8cb1014bf9d77a044a404 (patch) | |
tree | 29455c84f1eec9f742898593d282fc4c9f63dad8 /mysql-test/t/join_cache.test | |
parent | 1b03a028fcc4a4ac6337a64c9bb85add5c1ae6bc (diff) | |
download | mariadb-git-0f0360e21f45ad9704c8cb1014bf9d77a044a404.tar.gz |
Fixed LP bug #725050.
The bug in the function print_keyuse() caused crashes if
hash join could be used. It happened because the function
ignored the fact that KEYUSE structures could be created
for hash joins as well.
Diffstat (limited to 'mysql-test/t/join_cache.test')
-rw-r--r-- | mysql-test/t/join_cache.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/join_cache.test b/mysql-test/t/join_cache.test index 4bde588cb7d..654c9f96a24 100644 --- a/mysql-test/t/join_cache.test +++ b/mysql-test/t/join_cache.test @@ -3100,3 +3100,21 @@ DROP TABLE t1,t2; # this must be the last command in the file set @@optimizer_switch=@save_optimizer_switch; + +--echo # +--echo # Bug #725050: print keyuse info when hash join is used +--echo # + +create table t1 (a int, b int); +insert into t1 values (2,2), (1,1); +create table t2 (a int); +insert into t2 values (2), (3); + +set session join_cache_level=3; +set @@debug = 'd:t:O,/tmp/trace.out'; + +explain select t1.b from t1,t2 where t1.b=t2.a; +select t1.b from t1,t2 where t1.b=t2.a; + +set session join_cache_level=default; +drop table t1,t2; |