1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

don't allow KILL QUERY ID USER xxx

This commit is contained in:
Sergei Golubchik
2021-01-18 11:22:48 +01:00
parent 59e6d14c47
commit 4a7e62296a
3 changed files with 22 additions and 7 deletions

View File

@ -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

View File

@ -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';

View File

@ -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; }
;