List:Commits« Previous MessageNext Message »
From:Oystein Grovlen Date:November 10 2010 2:53pm
Subject:bzr commit into mysql-trunk-bugfixing branch (oystein.grovlen:3346) Bug#57704
View as plain text  
#At file:///home/og136792/mysql/mysql-trunk-bugfixing/ based on revid:dmitry.shulga@stripped

 3346 Oystein Grovlen	2010-11-10 [merge]
      Merge fix for Bug#57704 into mysql-trunk-bugfixing

    modified:
      mysql-test/r/subselect.result
      mysql-test/t/subselect.test
      sql/sql_union.cc
=== modified file 'mysql-test/r/subselect.result'
--- a/mysql-test/r/subselect.result	2010-09-10 08:06:58 +0000
+++ b/mysql-test/r/subselect.result	2010-11-10 14:53:11 +0000
@@ -5005,3 +5005,15 @@ SELECT * FROM t2 UNION SELECT * FROM t2
 ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
 DROP TABLE t1,t2;
 End of 5.1 tests
+#
+# Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool): 
+#             Assertion `file' failed.
+#
+CREATE TABLE t1 (a INT);
+SELECT 1 FROM 
+(SELECT ROW(
+(SELECT 1 FROM t1 RIGHT JOIN 
+(SELECT 1 FROM t1, t1 t2) AS d ON 1),
+1) FROM t1) AS e;
+ERROR 21000: Operand should contain 1 column(s)
+DROP TABLE t1;

=== modified file 'mysql-test/t/subselect.test'
--- a/mysql-test/t/subselect.test	2010-06-25 13:32:47 +0000
+++ b/mysql-test/t/subselect.test	2010-11-10 14:48:29 +0000
@@ -3946,3 +3946,21 @@ DROP TABLE t1,t2;
 --enable_result_log
 
 --echo End of 5.1 tests
+
+--echo #
+--echo # Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool): 
+--echo #             Assertion `file' failed.
+--echo #
+
+CREATE TABLE t1 (a INT);
+
+--error ER_OPERAND_COLUMNS
+SELECT 1 FROM 
+  (SELECT ROW(
+    (SELECT 1 FROM t1 RIGHT JOIN 
+      (SELECT 1 FROM t1, t1 t2) AS d ON 1),
+    1) FROM t1) AS e;
+
+DROP TABLE t1;
+
+

=== modified file 'sql/sql_union.cc'
--- a/sql/sql_union.cc	2010-10-20 21:34:37 +0000
+++ b/sql/sql_union.cc	2010-11-10 14:53:11 +0000
@@ -434,6 +434,7 @@ bool st_select_lex_unit::prepare(THD *th
 
 err:
   thd_arg->lex->current_select= lex_select_save;
+  (void) cleanup();
   DBUG_RETURN(TRUE);
 }
 

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-trunk-bugfixing branch (oystein.grovlen:3346) Bug#57704Oystein Grovlen10 Nov