diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2011-01-14 13:07:50 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2011-01-14 13:07:50 +0300 |
commit | 7fd3c9e2ffd3992e514d6149484a89d32b65e277 (patch) | |
tree | f336b4ee2848f496748f7385041328fb39686803 /mysql-test/t/join_cache.test | |
parent | ad78c24a20278f072017f3b0e397d01fc0ccec9f (diff) | |
parent | b266e5b972ec05ce82cccf829abf6c137e090cdd (diff) | |
download | mariadb-git-7fd3c9e2ffd3992e514d6149484a89d32b65e277.tar.gz |
Merge backported subquery bugfixes/testcases into MariaDB 5.3
Diffstat (limited to 'mysql-test/t/join_cache.test')
-rw-r--r-- | mysql-test/t/join_cache.test | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/mysql-test/t/join_cache.test b/mysql-test/t/join_cache.test index c9c93c74f46..692057a371b 100644 --- a/mysql-test/t/join_cache.test +++ b/mysql-test/t/join_cache.test @@ -2845,6 +2845,32 @@ SELECT * FROM t1,t2 WHERE t2.f1 = t1.f1; SET SESSION join_cache_level = DEFAULT; DROP TABLE t1,t2; - + +--echo # +--echo # Backported testcase for: Bug #45092: join buffer contains two blob columns one of which is +--echo # used in the key employed to access the joined table +--echo # + +CREATE TABLE t1 (c1 int, c2 int, key (c2)); +INSERT INTO t1 VALUES (1,1); +INSERT INTO t1 VALUES (2,2); + +CREATE TABLE t2 (c1 text, c2 text); +INSERT INTO t2 VALUES('tt', 'uu'); +INSERT INTO t2 VALUES('zzzz', 'xxxxxxxxx'); + +--disable_result_log +ANALYZE TABLE t1,t2; +--enable_result_log + +set join_cache_level=6; + +SELECT t1.*, t2.*, LENGTH(t2.c1), LENGTH(t2.c2) FROM t1,t2 + WHERE t1.c2=LENGTH(t2.c2) and t1.c1=LENGTH(t2.c1); + +set join_cache_level=default; + +DROP TABLE t1,t2; + # this must be the last command in the file set @@optimizer_switch=@save_optimizer_switch; |