[Commits] Rev 2872: Backport testcase for: in file:///home/psergey/dev2/5.3-fix-subq/

Sergey Petrunya psergey at askmonty.org
Thu Jan 13 22:47:16 EET 2011


At file:///home/psergey/dev2/5.3-fix-subq/

------------------------------------------------------------
revno: 2872
revision-id: psergey at askmonty.org-20110113204715-8wcq011d15t0d0hf
parent: psergey at askmonty.org-20110113162531-yx0gmu3u3jblt7qr
committer: Sergey Petrunya <psergey at askmonty.org>
branch nick: 5.3-fix-subq
timestamp: Thu 2011-01-13 23:47:15 +0300
message:
  Backport testcase for:
  Bug #45092: join buffer contains two blob columns one of which is used in the key employed to access the joined table
=== modified file 'mysql-test/r/join_cache.result'
--- a/mysql-test/r/join_cache.result	2010-12-11 07:23:34 +0000
+++ b/mysql-test/r/join_cache.result	2011-01-13 20:47:15 +0000
@@ -6056,4 +6056,22 @@
 SET SESSION optimizer_switch = 'outer_join_with_cache=off';
 SET SESSION join_cache_level = DEFAULT;
 DROP TABLE t1,t2,t3,t4,t5;
+#
+# Backported testcase for: Bug #45092: join buffer contains two blob columns one of which is
+#   used in the key employed to access the joined table
+#
+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');
+ANALYZE TABLE t1,t2;
+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);
+c1	c2	c1	c2	LENGTH(t2.c1)	LENGTH(t2.c2)
+2	2	tt	uu	2	2
+set join_cache_level=default;
+DROP TABLE t1,t2;
 set @@optimizer_switch=@save_optimizer_switch;

=== modified file 'mysql-test/t/join_cache.test'
--- a/mysql-test/t/join_cache.test	2010-11-19 15:38:02 +0000
+++ b/mysql-test/t/join_cache.test	2011-01-13 20:47:15 +0000
@@ -2700,5 +2700,31 @@
 
 DROP TABLE t1,t2,t3,t4,t5;
 
+--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;



More information about the commits mailing list