[Commits] Rev 3151: Added a test case for LP bug #823835 - a duplicate of bug 823189. in file:///home/igor/maria/maria-5.3-trunk/

Igor Babaev igor at askmonty.org
Fri Aug 12 08:34:41 EEST 2011


At file:///home/igor/maria/maria-5.3-trunk/

------------------------------------------------------------
revno: 3151
revision-id: igor at askmonty.org-20110812053441-rrax06kfhjlmkq45
parent: igor at askmonty.org-20110812032432-1e617vqk61iud7xf
committer: Igor Babaev <igor at askmonty.org>
branch nick: maria-5.3-trunk
timestamp: Thu 2011-08-11 22:34:41 -0700
message:
  Added a test case for LP bug #823835 - a duplicate of bug 823189.
   
-------------- next part --------------
=== modified file 'mysql-test/r/derived_view.result'
--- a/mysql-test/r/derived_view.result	2011-08-11 19:11:04 +0000
+++ b/mysql-test/r/derived_view.result	2011-08-12 05:34:41 +0000
@@ -1243,4 +1243,31 @@
 1	NULL
 DROP VIEW v1;
 DROP TABLE t1,t2;
+#
+# LP bug #823835: a duplicate of #823189 with derived table
+#
+CREATE TABLE t1 (a varchar(32)) ;
+INSERT INTO t1 VALUES ('r'), ('p');
+CREATE TABLE t2 (a int NOT NULL, b varchar(32)) ;
+INSERT INTO t2 VALUES (28,'j');
+CREATE TABLE t3 (a int);
+INSERT INTO t3 VALUES (0), (0);
+EXPLAIN EXTENDED
+SELECT * FROM (SELECT * FROM t1) AS t
+WHERE EXISTS (SELECT t2.a FROM t3 RIGHT JOIN t2 ON (t3.a = t2.a)
+WHERE t2.b < t.a);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	2	100.00	Using where
+3	DEPENDENT SUBQUERY	t2	system	NULL	NULL	NULL	NULL	1	100.00	
+3	DEPENDENT SUBQUERY	t3	ALL	NULL	NULL	NULL	NULL	2	100.00	Using where
+Warnings:
+Note	1276	Field or reference 't.a' of SELECT #3 was resolved in SELECT #1
+Note	1003	select `test`.`t1`.`a` AS `a` from `test`.`t1` where exists(select 28 from `test`.`t2` left join `test`.`t3` on((`test`.`t3`.`a` = 28)) where ('j' < `test`.`t1`.`a`))
+SELECT * FROM (SELECT * FROM t1) AS t
+WHERE EXISTS (SELECT t2.a FROM t3 RIGHT JOIN t2 ON (t3.a = t2.a)
+WHERE t2.b < t.a);
+a
+r
+p
+DROP TABLE t1,t2,t3;
 set optimizer_switch=@exit_optimizer_switch;

=== modified file 'mysql-test/t/derived_view.test'
--- a/mysql-test/t/derived_view.test	2011-08-11 19:11:04 +0000
+++ b/mysql-test/t/derived_view.test	2011-08-12 05:34:41 +0000
@@ -760,5 +760,28 @@
 DROP VIEW v1;
 DROP TABLE t1,t2;
 
+--echo #
+--echo # LP bug #823835: a duplicate of #823189 with derived table
+--echo #
+
+CREATE TABLE t1 (a varchar(32)) ;
+INSERT INTO t1 VALUES ('r'), ('p');
+
+CREATE TABLE t2 (a int NOT NULL, b varchar(32)) ;
+INSERT INTO t2 VALUES (28,'j');
+
+CREATE TABLE t3 (a int);
+INSERT INTO t3 VALUES (0), (0);
+
+EXPLAIN EXTENDED
+SELECT * FROM (SELECT * FROM t1) AS t
+WHERE EXISTS (SELECT t2.a FROM t3 RIGHT JOIN t2 ON (t3.a = t2.a)
+                WHERE t2.b < t.a);
+SELECT * FROM (SELECT * FROM t1) AS t
+WHERE EXISTS (SELECT t2.a FROM t3 RIGHT JOIN t2 ON (t3.a = t2.a)
+                WHERE t2.b < t.a);
+
+DROP TABLE t1,t2,t3;
+
 # The following command must be the last one the file 
 set optimizer_switch=@exit_optimizer_switch;



More information about the commits mailing list