Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4a7e6229
Commit
4a7e6229
authored
Jan 18, 2021
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't allow `KILL QUERY ID USER xxx`
parent
59e6d14c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
mysql-test/r/kill.result
mysql-test/r/kill.result
+5
-0
mysql-test/t/kill.test
mysql-test/t/kill.test
+6
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+11
-7
No files found.
mysql-test/r/kill.result
View file @
4a7e6229
...
@@ -415,3 +415,8 @@ ALTER TABLE t2 DROP c;
...
@@ -415,3 +415,8 @@ ALTER TABLE t2 DROP c;
UNLOCK TABLES;
UNLOCK TABLES;
DROP VIEW v1;
DROP VIEW v1;
DROP TABLE t1, t2;
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
mysql-test/t/kill.test
View file @
4a7e6229
...
@@ -663,3 +663,9 @@ ALTER TABLE t2 DROP c;
...
@@ -663,3 +663,9 @@ ALTER TABLE t2 DROP c;
UNLOCK
TABLES
;
UNLOCK
TABLES
;
DROP
VIEW
v1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# KILL QUERY ID USER
--
echo
#
--
error
ER_PARSE_ERROR
kill
query
id
user
'foo'
;
sql/sql_yacc.yy
View file @
4a7e6229
...
@@ -1033,7 +1033,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
...
@@ -1033,7 +1033,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
Currently there are 98 shift/reduce conflicts.
Currently there are 98 shift/reduce conflicts.
We should not introduce new conflicts any more.
We should not introduce new conflicts any more.
*/
*/
%expect 1
09
%expect 1
15
/*
/*
Comments for TOKENS.
Comments for TOKENS.
...
@@ -13525,7 +13525,7 @@ kill:
...
@@ -13525,7 +13525,7 @@ kill:
lex->sql_command= SQLCOM_KILL;
lex->sql_command= SQLCOM_KILL;
lex->kill_type= KILL_TYPE_ID;
lex->kill_type= KILL_TYPE_ID;
}
}
kill_type kill_option
kill_expr
kill_type kill_option
{
{
Lex->kill_signal= (killed_state) ($3 | $4);
Lex->kill_signal= (killed_state) ($3 | $4);
}
}
...
@@ -13538,16 +13538,21 @@ kill_type:
...
@@ -13538,16 +13538,21 @@ kill_type:
;
;
kill_option:
kill_option:
/* empty */ { $$= (int) KILL_CONNECTION; }
opt_connection kill_expr { $$= (int) KILL_CONNECTION; }
| CONNECTION_SYM { $$= (int) KILL_CONNECTION; }
| QUERY_SYM kill_expr { $$= (int) KILL_QUERY; }
| QUERY_SYM { $$= (int) KILL_QUERY; }
| QUERY_SYM ID_SYM expr
| QUERY_SYM ID_SYM
{
{
$$= (int) KILL_QUERY;
$$= (int) KILL_QUERY;
Lex->kill_type= KILL_TYPE_QUERY;
Lex->kill_type= KILL_TYPE_QUERY;
Lex->value_list.push_front($3, thd->mem_root);
}
}
;
;
opt_connection:
/* empty */ { }
| CONNECTION_SYM { }
;
kill_expr:
kill_expr:
expr
expr
{
{
...
@@ -13560,7 +13565,6 @@ kill_expr:
...
@@ -13560,7 +13565,6 @@ kill_expr:
}
}
;
;
shutdown:
shutdown:
SHUTDOWN { Lex->sql_command= SQLCOM_SHUTDOWN; }
SHUTDOWN { Lex->sql_command= SQLCOM_SHUTDOWN; }
;
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment