List:Commits« Previous MessageNext Message »
From:Evgeny Potemkin Date:May 28 2011 1:26pm
Subject:bzr push into mysql-trunk branch (evgeny.potemkin:3004 to 3005)
View as plain text  
 3005 Evgeny Potemkin	2011-05-28 [merge]
      Manual merge.

    modified:
      mysql-test/r/derived.result
      mysql-test/r/heap.result
      mysql-test/t/derived.test
      sql/item_subselect.cc
      sql/sql_select.cc
 3004 Evgeny Potemkin	2011-05-28 [merge]
      Auto-merged.

    modified:
      mysql-test/r/heap.result
      mysql-test/t/heap.test
      sql/item_sum.cc
      storage/heap/hp_hash.c
=== modified file 'mysql-test/r/derived.result'
--- a/mysql-test/r/derived.result	2011-05-28 08:56:48 +0000
+++ b/mysql-test/r/derived.result	2011-05-28 13:26:31 +0000
@@ -1439,3 +1439,23 @@ WHERE (a, a) NOT IN
 a
 DROP TABLE t1;
 #
+# Bug#11791649 - ASSERT: FIXED == 0, IN ITEM.CC ON EXPLAIN WITH VIEW
+#                IN SUBQUERY 
+#
+CREATE TABLE t1 (pk int);
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 (col_varchar_nokey varchar(1));
+INSERT INTO t2 VALUES ('m'), ('f');
+EXPLAIN SELECT pk
+FROM t1
+WHERE (2) IN
+( SELECT *
+FROM (SELECT COUNT(col_varchar_nokey) FROM t2) d
+)
+;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	system	NULL	NULL	NULL	NULL	1	
+2	DEPENDENT SUBQUERY	<derived3>	ref	auto_key0	auto_key0	8	const	0	Using where; Using index
+3	DERIVED	t2	ALL	NULL	NULL	NULL	NULL	2	
+DROP TABLE t1,t2;
+#

=== modified file 'mysql-test/r/heap.result'
--- a/mysql-test/r/heap.result	2011-05-28 09:46:56 +0000
+++ b/mysql-test/r/heap.result	2011-05-28 13:26:31 +0000
@@ -772,6 +772,6 @@ WHERE ('h', 0) NOT IN ( SELECT * FROM v1
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
 2	DEPENDENT SUBQUERY	<derived3>	index_subquery	auto_key0	auto_key0	12	const,const	2	Using index; Using where
-3	DERIVED	t1	index	PRIMARY	PRIMARY	4	NULL	2	Using where; Using index
+3	DERIVED	t1	range	PRIMARY	PRIMARY	4	NULL	1	Using index condition; Using where
 DROP TABLE t1,t2,h1;
 DROP VIEW v1;

=== modified file 'mysql-test/t/derived.test'
--- a/mysql-test/t/derived.test	2011-05-28 08:56:48 +0000
+++ b/mysql-test/t/derived.test	2011-05-28 13:26:31 +0000
@@ -814,4 +814,22 @@ WHERE (a, a) NOT IN
 
 DROP TABLE t1; 
 --echo #
+--echo # Bug#11791649 - ASSERT: FIXED == 0, IN ITEM.CC ON EXPLAIN WITH VIEW
+--echo #                IN SUBQUERY 
+--echo #
+CREATE TABLE t1 (pk int);
+INSERT INTO t1 VALUES (1);
+
+CREATE TABLE t2 (col_varchar_nokey varchar(1));
+INSERT INTO t2 VALUES ('m'), ('f');
+
+EXPLAIN SELECT pk
+FROM t1
+WHERE (2) IN
+  ( SELECT *
+     FROM (SELECT COUNT(col_varchar_nokey) FROM t2) d
+  )
+; 
+DROP TABLE t1,t2;
+--echo #
 

=== modified file 'sql/item_subselect.cc'
--- a/sql/item_subselect.cc	2011-02-18 10:46:59 +0000
+++ b/sql/item_subselect.cc	2011-05-28 10:48:53 +0000
@@ -2618,9 +2618,10 @@ int subselect_uniquesubquery_engine::exe
     bool err= mysql_handle_single_derived(table->in_use->lex, tl,
                                           mysql_derived_create) ||
               mysql_handle_single_derived(table->in_use->lex, tl,
-                                          mysql_derived_materialize) ||
-              mysql_handle_single_derived(table->in_use->lex, tl,
-                                          mysql_derived_cleanup);
+                                          mysql_derived_materialize);
+    if (!tab->table->in_use->lex->describe)
+      mysql_handle_single_derived(table->in_use->lex, tl,
+                                  mysql_derived_cleanup);
     if (err)
       DBUG_RETURN(1);
   }
@@ -2738,9 +2739,10 @@ int subselect_indexsubquery_engine::exec
     bool err= mysql_handle_single_derived(table->in_use->lex, tl,
                                           mysql_derived_create) ||
               mysql_handle_single_derived(table->in_use->lex, tl,
-                                          mysql_derived_materialize) ||
-              mysql_handle_single_derived(table->in_use->lex, tl,
-                                          mysql_derived_cleanup);
+                                          mysql_derived_materialize);
+    if (!tab->table->in_use->lex->describe)
+      mysql_handle_single_derived(table->in_use->lex, tl,
+                                  mysql_derived_cleanup);
     if (err)
       DBUG_RETURN(1);
   }

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-05-28 08:56:48 +0000
+++ b/sql/sql_select.cc	2011-05-28 13:26:31 +0000
@@ -18520,8 +18520,9 @@ join_materialize_table(JOIN_TAB *tab)
               !derived->materialized);
   bool res= mysql_handle_single_derived(tab->table->in_use->lex,
                                         derived, &mysql_derived_materialize);
-  mysql_handle_single_derived(tab->table->in_use->lex,
-                              derived, &mysql_derived_cleanup);
+  if (!tab->table->in_use->lex->describe)
+    mysql_handle_single_derived(tab->table->in_use->lex,
+                                derived, &mysql_derived_cleanup);
   return res ? NESTED_LOOP_ERROR : NESTED_LOOP_OK;
 }
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (evgeny.potemkin:3004 to 3005) Evgeny Potemkin31 May