List:Commits« Previous MessageNext Message »
From:Jorgen Loland Date:June 14 2010 7:04am
Subject:bzr push into mysql-next-mr-opt-backporting branch (jorgen.loland:3195)
View as plain text  
 3195 Jorgen Loland	2010-06-14 [merge]
      Local merge

    modified:
      sql/sql_select.cc
=== modified file '.bzr-mysql/default.conf'
--- a/.bzr-mysql/default.conf	2010-05-23 12:59:10 +0000
+++ b/.bzr-mysql/default.conf	2010-06-14 07:02:07 +0000
@@ -1,4 +1,4 @@
 [MYSQL]
 post_commit_to = "commits@stripped"
 post_push_to = "commits@stripped"
-tree_name = "mysql-next-mr-bugfixing"
+tree_name = "mysql-next-mr-opt-backporting"

=== modified file 'mysql-test/r/subselect_sj2.result'
--- a/mysql-test/r/subselect_sj2.result	2010-06-11 12:27:38 +0000
+++ b/mysql-test/r/subselect_sj2.result	2010-06-14 06:59:59 +0000
@@ -737,3 +737,26 @@ i
 1
 2
 drop table t1,t2,t3;
+#
+# BUG#53103: MTR test ps crashes in optimize_cond() 
+#            when running with --debug
+#
+CREATE TABLE t1(track varchar(15));
+INSERT INTO t1 VALUES ('CAD'), ('CAD');
+PREPARE STMT FROM
+"SELECT 1 FROM t1
+  WHERE
+        track IN (SELECT track FROM t1
+                                    GROUP BY track 
+                                      HAVING track>='CAD')";
+EXECUTE STMT ;
+1
+1
+1
+EXECUTE STMT ;
+1
+1
+1
+DEALLOCATE PREPARE STMT;
+DROP TABLE t1;
+# End of BUG#53103

=== modified file 'mysql-test/t/subselect_sj2.test'
--- a/mysql-test/t/subselect_sj2.test	2010-06-11 12:27:38 +0000
+++ b/mysql-test/t/subselect_sj2.test	2010-06-14 06:59:59 +0000
@@ -915,3 +915,27 @@ explain extended SELECT * FROM t1 WHERE 
 SELECT * FROM t1 WHERE (t1.i) IN 
 (SELECT t3.i FROM t3 LEFT JOIN t2 ON t2.i=t3.i);
 drop table t1,t2,t3;
+
+--echo #
+--echo # BUG#53103: MTR test ps crashes in optimize_cond() 
+--echo #            when running with --debug
+--echo #
+
+CREATE TABLE t1(track varchar(15));
+
+INSERT INTO t1 VALUES ('CAD'), ('CAD');
+
+PREPARE STMT FROM
+"SELECT 1 FROM t1
+  WHERE
+        track IN (SELECT track FROM t1
+                                    GROUP BY track 
+                                      HAVING track>='CAD')";
+EXECUTE STMT ;
+EXECUTE STMT ;
+
+DEALLOCATE PREPARE STMT;
+DROP TABLE t1; 
+
+--echo # End of BUG#53103
+

=== modified file 'sql/item_subselect.h'
--- a/sql/item_subselect.h	2010-05-14 10:58:39 +0000
+++ b/sql/item_subselect.h	2010-06-14 06:59:59 +0000
@@ -703,7 +703,7 @@ protected:
   /*
     The old engine already chosen at parse time and stored in permanent memory.
     Through this member we can re-create and re-prepare materialize_join for
-    each execution of a prepared statement. We akso resuse the functionality
+    each execution of a prepared statement. We also reuse the functionality
     of subselect_single_select_engine::[prepare | cols].
   */
   subselect_single_select_engine *materialize_engine;
@@ -727,7 +727,10 @@ public:
   bool init_permanent(List<Item> *tmp_columns);
   bool init_runtime();
   void cleanup();
-  int prepare() { return 0; }
+  int prepare() 
+  { 
+    return materialize_engine->prepare();
+  }
   int exec();
   void print (String *str, enum_query_type query_type);
   uint cols()


Attachment: [text/bzr-bundle] bzr/jorgen.loland@sun.com-20100614070404-ugduhg721v5o3law.bundle
Thread
bzr push into mysql-next-mr-opt-backporting branch (jorgen.loland:3195) Jorgen Loland14 Jun