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 18:02:43 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 18:02:37 kroki@stripped +15 -5
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 18:02:37 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 18:02:36 kroki@stripped +9 -0
Add test case for bug#15463.
mysql-test/r/explain.result
1.16 06/05/03 18:02:36 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 18:02:37 +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 18:02:37 +04:00
@@ -5795,7 +5795,11 @@
if (lex->result)
((select_dumpvar *)lex->result)->var_list.push_back( new my_var($2,0,0,(enum_field_types)0));
else
- YYABORT;
+ /*
+ The parser won't create select_result instance only
+ if it's an EXPLAIN.
+ */
+ DBUG_ASSERT(lex->describe);
}
| ident_or_text
{
@@ -5807,10 +5811,8 @@
my_error(ER_SP_UNDECLARED_VAR, MYF(0), $1.str);
YYABORT;
}
- if (! lex->result)
- YYABORT;
- else
- {
+ if (lex->result)
+ {
my_var *var;
((select_dumpvar *)lex->result)->
var_list.push_back(var= new my_var($1,1,t->offset,t->type));
@@ -5818,6 +5820,14 @@
if (var)
var->sp= lex->sphead;
#endif
+ }
+ else
+ {
+ /*
+ The parser won't create select_result instance only
+ if it's an EXPLAIN.
+ */
+ DBUG_ASSERT(lex->describe);
}
}
;
--- 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 18:02:36 +04:00
@@ -53,3 +53,7 @@
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 18:02:36 +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#15463 | kroki | 3 May |