List:Commits« Previous MessageNext Message »
From:Sergey Petrunia Date:June 30 2006 7:34am
Subject:bk commit into 5.1 tree (sergefp:1.2225) BUG#20484
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of psergey. When psergey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2225 06/06/30 09:34:06 sergefp@stripped +3 -0
  BUG#20484: "Partitions: crash with EXPLAIN and UNION"
   - Don't forget to produce "partitions" column for "UNION RESULT" row of EXPLAIN output

  sql/sql_select.cc
    1.417 06/06/30 09:34:00 sergefp@stripped +3 -0
    BUG#20484: "Partitions: crash with EXPLAIN and UNION"
     - Don't forget to produce "partitions" column for "UNION RESULT" row of EXPLAIN
output

  mysql-test/t/partition_pruning.test
    1.15 06/06/30 09:34:00 sergefp@stripped +7 -0
    BUG#20484: Testcase

  mysql-test/r/partition_pruning.result
    1.18 06/06/30 09:34:00 sergefp@stripped +7 -0
    BUG#20484: Testcase

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	sergefp
# Host:	newbox.mylan
# Root:	/home/psergey/mysql-5.1-bug20484

--- 1.416/sql/sql_select.cc	2006-06-28 19:30:59 +04:00
+++ 1.417/sql/sql_select.cc	2006-06-30 09:34:00 +04:00
@@ -13938,6 +13938,9 @@ static void select_describe(JOIN *join, 
       }
       item_list.push_back(new Item_string(table_name_buffer, len, cs));
     }
+    /* partitions */
+    if (join->thd->lex->describe & DESCRIBE_PARTITIONS)
+      item_list.push_back(item_null);
     /* type */
     item_list.push_back(new Item_string(join_type_str[JT_ALL],
 					  strlen(join_type_str[JT_ALL]),

--- 1.17/mysql-test/r/partition_pruning.result	2006-06-21 12:00:07 +04:00
+++ 1.18/mysql-test/r/partition_pruning.result	2006-06-30 09:34:00 +04:00
@@ -697,3 +697,10 @@ ref	NULL
 rows	2
 Extra	
 drop table t2;
+create table t1 (s1 int);
+explain partitions select 1 from t1 union all select 2;
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	NULL	system	NULL	NULL	NULL	NULL	0	const row not found
+2	UNION	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
+NULL	UNION RESULT	<union1,2>	NULL	ALL	NULL	NULL	NULL	NULL	NULL	
+drop table t1;

--- 1.14/mysql-test/t/partition_pruning.test	2006-06-05 15:15:22 +04:00
+++ 1.15/mysql-test/t/partition_pruning.test	2006-06-30 09:34:00 +04:00
@@ -590,3 +590,10 @@ explain partitions select * from t2;
 --horizontal_results
 drop table t2;
 
+
+# BUG#20484 "Partitions: crash with explain and union"
+create table t1 (s1 int);
+explain partitions select 1 from t1 union all select 2;
+drop table t1;
+
+
Thread
bk commit into 5.1 tree (sergefp:1.2225) BUG#20484Sergey Petrunia30 Jun