Fixes for usage of sub-selects in KILL and HANDLER ....

Approved by Sanja ... ;o)
parent af76ac08
...@@ -2562,6 +2562,12 @@ select_derived: ...@@ -2562,6 +2562,12 @@ select_derived:
{ {
LEX *lex= Lex; LEX *lex= Lex;
lex->derived_tables= 1; lex->derived_tables= 1;
if (((int)lex->sql_command >= (int)SQLCOM_HA_OPEN &&
lex->sql_command <= (int)SQLCOM_HA_READ) || lex->sql_command == (int)SQLCOM_KILL)
{
send_error(lex->thd, ER_SYNTAX_ERROR);
YYABORT;
}
if (lex->current_select->linkage == GLOBAL_OPTIONS_TYPE || if (lex->current_select->linkage == GLOBAL_OPTIONS_TYPE ||
mysql_new_select(lex, 1)) mysql_new_select(lex, 1))
YYABORT; YYABORT;
...@@ -4578,6 +4584,12 @@ in_subselect_init: ...@@ -4578,6 +4584,12 @@ in_subselect_init:
subselect_start: subselect_start:
'(' SELECT_SYM '(' SELECT_SYM
{ {
LEX *lex=Lex;
if (((int)lex->sql_command >= (int)SQLCOM_HA_OPEN &&
lex->sql_command <= (int)SQLCOM_HA_READ) || lex->sql_command == (int)SQLCOM_KILL) {
send_error(lex->thd, ER_SYNTAX_ERROR);
YYABORT;
}
if (mysql_new_select(Lex, 1)) if (mysql_new_select(Lex, 1))
YYABORT; YYABORT;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment