List:Commits« Previous MessageNext Message »
From:kroki Date:May 3 2006 1:23pm
Subject:bk commit into 5.0 tree (kroki:1.2116) BUG#15463
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of tomash. When tomash 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.2116 06/05/03 15:23:05 kroki@stripped +4 -0
  Bug#15463: EXPLAIN SELECT..INTO hangs the client (QB, command line)
  
  There were two distict bugs: parse error was returned for valid
  statement and that error wasn't reported to the client.
  
  The fix ensures that EXPLAIN SELECT..INTO is accepted by parser and any
  other parse error will be reported to the client.

  sql/sql_yacc.yy
    1.467 06/05/03 15:22:59 kroki@stripped +4 -2
    If there is no lex->result in select_var_ident rule, then we have
    to be in DESCRIBE mode.

  sql/sql_parse.cc
    1.543 06/05/03 15:22:58 kroki@stripped +1 -0
    Assert that if parsing error has occured then apropriate error message
    has been pushed into error stack.

  mysql-test/t/explain.test
    1.9 06/05/03 15:22:58 kroki@stripped +9 -0
    Add test case for bug#15463.

  mysql-test/r/explain.result
    1.16 06/05/03 15:22:57 kroki@stripped +4 -0
    Add result for bug#15463.

# 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:	kroki
# Host:	moonlight.intranet
# Root:	/home/tomash/src/mysql_ab/mysql-5.0-bug15463

--- 1.542/sql/sql_parse.cc	2006-05-02 06:50:28 +04:00
+++ 1.543/sql/sql_parse.cc	2006-05-03 15:22:58 +04:00
@@ -5709,6 +5709,7 @@
     }
     else
     {
+      DBUG_ASSERT(thd->net.report_error);
       DBUG_PRINT("info",("Command aborted. Fatal_error: %d",
 			 thd->is_fatal_error));
       query_cache_abort(&thd->net);

--- 1.466/sql/sql_yacc.yy	2006-04-23 08:11:24 +04:00
+++ 1.467/sql/sql_yacc.yy	2006-05-03 15:22:59 +04:00
@@ -5795,7 +5795,7 @@
 	     if (lex->result) 
 	       ((select_dumpvar *)lex->result)->var_list.push_back( new
my_var($2,0,0,(enum_field_types)0));
 	     else
-	       YYABORT;
+               DBUG_ASSERT(lex->describe);
 	   }
            | ident_or_text
            {
@@ -5808,7 +5808,9 @@
 	       YYABORT;
 	     }
 	     if (! lex->result)
-	       YYABORT;
+             {
+               DBUG_ASSERT(lex->describe);
+             }
 	     else
 	     {
                my_var *var;

--- 1.15/mysql-test/r/explain.result	2004-05-14 12:08:18 +04:00
+++ 1.16/mysql-test/r/explain.result	2006-05-03 15:22:57 +04:00
@@ -53,3 +53,7 @@
 1	SIMPLE	таб	ref	инд0,инд01	инд0	5	const	1	Using where; Using index
 drop table таб;
 set names latin1;
+select 3 into @v1;
+explain select 3 into @v1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used

--- 1.8/mysql-test/t/explain.test	2005-07-28 04:21:41 +04:00
+++ 1.9/mysql-test/t/explain.test	2006-05-03 15:22:58 +04:00
@@ -43,3 +43,12 @@
 set names latin1;
 
 # End of 4.1 tests
+
+
+#
+# Bug#15463: EXPLAIN SELECT..INTO hangs the client (QB, command line)
+#
+select 3 into @v1;
+explain select 3 into @v1;
+
+# End of 5.0 tests.
Thread
bk commit into 5.0 tree (kroki:1.2116) BUG#15463kroki3 May