List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:May 16 2011 8:44am
Subject:bzr commit into mysql-trunk branch (sergey.glukhov:3328) Bug#12402590
View as plain text  
#At file:///home/gluh/MySQL/mysql-trunk/ based on revid:sergey.glukhov@stripped

 3328 Sergey Glukhov	2011-05-16
      Bug#12402590 ASSERT AT PROTOCOL::END_STATEMENT ON MYSQL-TRUNK RUNNING RQG_OPT_SUBQUERY TEST
      There are two problems:
      1. make_cond_for_table() fails to extract sort table condition for ICP
      The fix is to use (table_map) 0 instead of used_tables
      in third argument for make_cond_for_table() function.
      (for more info see bug11756928).
      2. when we exit from JOIN::exec due to failed extraction of
      sort table condition for ICP we do not set proper diagnostic
      status of Diagnostics_area(should be my_error() call or something
      similar). There are many places in JOIN::exec (DBUG_VOID_RETURN on
      error without my_error() call) which could have the same problems.
      This problem will be fixed separatly.
     @ mysql-test/r/having.result
        test case
     @ mysql-test/t/having.test
        test case
     @ sql/sql_select.cc
        use (table_map) 0 instead of used_tables in
        third argument for make_cond_for_table() function.
        (for more info see bug11756928).

    modified:
      mysql-test/r/having.result
      mysql-test/t/having.test
      sql/sql_select.cc
=== modified file 'mysql-test/r/having.result'
--- a/mysql-test/r/having.result	2011-04-22 08:05:02 +0000
+++ b/mysql-test/r/having.result	2011-05-16 08:43:57 +0000
@@ -589,3 +589,19 @@ pk	field1
 1	7
 drop table `t1`;
 End of 5.5 tests
+#
+# Bug#12402590 ASSERT AT PROTOCOL::END_STATEMENT ON MYSQL-TRUNK RUNNING RQG_OPT_SUBQUERY TEST
+#
+CREATE TABLE t2 (f1 INT, PRIMARY KEY (f1));
+INSERT INTO t2 VALUES (1), (2);
+CREATE TABLE t1 (f1 INT, f2 VARCHAR(1), f3 VARCHAR(1),
+PRIMARY KEY (f1), KEY (f2, f1));
+INSERT INTO t1 VALUES (8, 'g', 'g'), (11, 'a', 'a');
+SELECT t1.f1 FROM t1 JOIN t2 ON t2.f1 = t1.f1
+WHERE t1.f3 AND t1.f2 IN ('f')
+HAVING (1 ,6) IN (SELECT 3, 6)
+ORDER BY t1.f1;
+f1
+DROP TABLE t1;
+DROP TABLE t2;
+End of 5.6 tests

=== modified file 'mysql-test/t/having.test'
--- a/mysql-test/t/having.test	2011-04-22 08:05:02 +0000
+++ b/mysql-test/t/having.test	2011-05-16 08:43:57 +0000
@@ -615,3 +615,23 @@ drop table `t1`;
 
 --echo End of 5.5 tests
 
+--echo #
+--echo # Bug#12402590 ASSERT AT PROTOCOL::END_STATEMENT ON MYSQL-TRUNK RUNNING RQG_OPT_SUBQUERY TEST
+--echo #
+
+CREATE TABLE t2 (f1 INT, PRIMARY KEY (f1));
+INSERT INTO t2 VALUES (1), (2);
+
+CREATE TABLE t1 (f1 INT, f2 VARCHAR(1), f3 VARCHAR(1),
+PRIMARY KEY (f1), KEY (f2, f1));
+INSERT INTO t1 VALUES (8, 'g', 'g'), (11, 'a', 'a');
+
+SELECT t1.f1 FROM t1 JOIN t2 ON t2.f1 = t1.f1
+WHERE t1.f3 AND t1.f2 IN ('f')
+HAVING (1 ,6) IN (SELECT 3, 6)
+ORDER BY t1.f1;
+
+DROP TABLE t1;
+DROP TABLE t2;
+
+--echo End of 5.6 tests

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-04-26 08:49:10 +0000
+++ b/sql/sql_select.cc	2011-05-16 08:43:57 +0000
@@ -3262,7 +3262,8 @@ JOIN::exec()
         if (curr_table->pre_idx_push_select_cond)
         {
           sort_table_cond= make_cond_for_table(curr_join->tmp_having,
-                                               used_tables, used_tables, 0);
+                                               used_tables,
+                                               (table_map) 0, 0);
           if (!sort_table_cond)
             DBUG_VOID_RETURN;
           Item* new_pre_idx_push_select_cond= 


Attachment: [text/bzr-bundle] bzr/sergey.glukhov@oracle.com-20110516084357-5e7tthk2u0y6a8dm.bundle
Thread
bzr commit into mysql-trunk branch (sergey.glukhov:3328) Bug#12402590Sergey Glukhov16 May
  • Re: bzr commit into mysql-trunk branch (sergey.glukhov:3328) Bug#12402590Olav Sandstaa16 May