mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
@ -53,3 +53,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE <09><><EFBFBD> ref <09><><EFBFBD>0,<2C><><EFBFBD>01 <09><><EFBFBD>0 5 const 1 Using where; Using index
|
||||
drop table <20><><EFBFBD>;
|
||||
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
|
||||
|
@ -43,3 +43,12 @@ drop table
|
||||
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.
|
||||
|
Reference in New Issue
Block a user