summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <kroki@mysql.com>2006-05-03 18:02:43 +0400
committerunknown <kroki@mysql.com>2006-05-03 18:02:43 +0400
commitbf8dac3b1949b16b4a91f0f09ec81806e73a46d7 (patch)
treec58eeded40e2e6c11428797b1ac18a15eb1c9ee9 /sql/sql_parse.cc
parent853f5413f631146c42b97409aef5f1ac4ad3614a (diff)
downloadmariadb-git-bf8dac3b1949b16b4a91f0f09ec81806e73a46d7.tar.gz
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. mysql-test/r/explain.result: Add result for bug#15463. mysql-test/t/explain.test: Add test case for bug#15463. sql/sql_parse.cc: Assert that if parsing error has occured then apropriate error message has been pushed into error stack. sql/sql_yacc.yy: If there is no lex->result in select_var_ident rule, then we have to be in DESCRIBE mode.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 196e723299a..649714315a6 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -5709,6 +5709,7 @@ void mysql_parse(THD *thd, char *inBuf, uint length)
}
else
{
+ DBUG_ASSERT(thd->net.report_error);
DBUG_PRINT("info",("Command aborted. Fatal_error: %d",
thd->is_fatal_error));
query_cache_abort(&thd->net);