Commit 4a7e6229 authored by Sergei Golubchik's avatar Sergei Golubchik

don't allow `KILL QUERY ID USER xxx`

parent 59e6d14c
......@@ -415,3 +415,8 @@ ALTER TABLE t2 DROP c;
UNLOCK TABLES;
DROP VIEW v1;
DROP TABLE t1, t2;
#
# KILL QUERY ID USER
#
kill query id user 'foo';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''foo'' at line 1
......@@ -663,3 +663,9 @@ ALTER TABLE t2 DROP c;
UNLOCK TABLES;
DROP VIEW v1;
DROP TABLE t1, t2;
--echo #
--echo # KILL QUERY ID USER
--echo #
--error ER_PARSE_ERROR
kill query id user 'foo';
......@@ -1033,7 +1033,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
Currently there are 98 shift/reduce conflicts.
We should not introduce new conflicts any more.
*/
%expect 109
%expect 115
/*
Comments for TOKENS.
......@@ -13525,7 +13525,7 @@ kill:
lex->sql_command= SQLCOM_KILL;
lex->kill_type= KILL_TYPE_ID;
}
kill_type kill_option kill_expr
kill_type kill_option
{
Lex->kill_signal= (killed_state) ($3 | $4);
}
......@@ -13538,16 +13538,21 @@ kill_type:
;
kill_option:
/* empty */ { $$= (int) KILL_CONNECTION; }
| CONNECTION_SYM { $$= (int) KILL_CONNECTION; }
| QUERY_SYM { $$= (int) KILL_QUERY; }
| QUERY_SYM ID_SYM
opt_connection kill_expr { $$= (int) KILL_CONNECTION; }
| QUERY_SYM kill_expr { $$= (int) KILL_QUERY; }
| QUERY_SYM ID_SYM expr
{
$$= (int) KILL_QUERY;
Lex->kill_type= KILL_TYPE_QUERY;
Lex->value_list.push_front($3, thd->mem_root);
}
;
opt_connection:
/* empty */ { }
| CONNECTION_SYM { }
;
kill_expr:
expr
{
......@@ -13560,7 +13565,6 @@ kill_expr:
}
;
shutdown:
SHUTDOWN { Lex->sql_command= SQLCOM_SHUTDOWN; }
;
......
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