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
19a1f488
Commit
19a1f488
authored
Mar 06, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
merged
parents
d86a66d4
a127344a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
mysql-test/r/kill.result
mysql-test/r/kill.result
+2
-0
mysql-test/t/kill.test
mysql-test/t/kill.test
+5
-2
sql/sql_yacc.yy
sql/sql_yacc.yy
+7
-10
No files found.
mysql-test/r/kill.result
View file @
19a1f488
...
@@ -17,6 +17,8 @@ select 4;
...
@@ -17,6 +17,8 @@ select 4;
4
4
4
4
drop table t1;
drop table t1;
kill (select count(*) from mysql.user);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select count(*) from mysql.user)' at line 1
create table t1 (id int primary key);
create table t1 (id int primary key);
create table t2 (id int unsigned not null);
create table t2 (id int unsigned not null);
insert into t2 select id from t1;
insert into t2 select id from t1;
...
...
mysql-test/t/kill.test
View file @
19a1f488
...
@@ -39,9 +39,12 @@ select @id != connection_id();
...
@@ -39,9 +39,12 @@ select @id != connection_id();
connection
con2
;
connection
con2
;
select
4
;
select
4
;
drop
table
t1
;
drop
table
t1
;
disconnect
con2
;
connection
default
;
connection
default
;
disconnect
con2
;
--
error
1064
kill
(
select
count
(
*
)
from
mysql
.
user
);
#
#
# BUG#14851: killing long running subquery processed via a temporary table.
# BUG#14851: killing long running subquery processed via a temporary table.
#
#
...
...
sql/sql_yacc.yy
View file @
19a1f488
...
@@ -3564,8 +3564,7 @@ select_derived2:
...
@@ -3564,8 +3564,7 @@ select_derived2:
{
{
LEX *lex= Lex;
LEX *lex= Lex;
lex->derived_tables= 1;
lex->derived_tables= 1;
if (((int)lex->sql_command >= (int)SQLCOM_HA_OPEN &&
if (lex->sql_command == (int)SQLCOM_HA_READ ||
lex->sql_command <= (int)SQLCOM_HA_READ) ||
lex->sql_command == (int)SQLCOM_KILL)
lex->sql_command == (int)SQLCOM_KILL)
{
{
yyerror(ER(ER_SYNTAX_ERROR));
yyerror(ER(ER_SYNTAX_ERROR));
...
@@ -4739,16 +4738,15 @@ purge_option:
...
@@ -4739,16 +4738,15 @@ purge_option:
/* kill threads */
/* kill threads */
kill:
kill:
KILL_SYM expr
KILL_SYM
{ Lex->sql_command= SQLCOM_KILL; }
expr
{
{
LEX *lex=Lex;
LEX *lex=Lex;
if ($
2->fix_fields(lex->thd, 0, &$2) || $2
->check_cols(1))
if ($
3->fix_fields(lex->thd, 0, &$3) || $3
->check_cols(1))
{
{
send_error(lex->thd, ER_SET_CONSTANTS_ONLY);
send_error(lex->thd, ER_SET_CONSTANTS_ONLY);
YYABORT;
YYABORT;
}
}
lex->sql_command=SQLCOM_KILL;
lex->thread_id= (ulong) $3->val_int();
lex->thread_id= (ulong) $2->val_int();
};
};
/* change database */
/* change database */
...
@@ -6162,8 +6160,7 @@ subselect_start:
...
@@ -6162,8 +6160,7 @@ subselect_start:
'(' SELECT_SYM
'(' SELECT_SYM
{
{
LEX *lex=Lex;
LEX *lex=Lex;
if (((int)lex->sql_command >= (int)SQLCOM_HA_OPEN &&
if (lex->sql_command == (int)SQLCOM_HA_READ ||
lex->sql_command <= (int)SQLCOM_HA_READ) ||
lex->sql_command == (int)SQLCOM_KILL)
lex->sql_command == (int)SQLCOM_KILL)
{
{
yyerror(ER(ER_SYNTAX_ERROR));
yyerror(ER(ER_SYNTAX_ERROR));
...
...
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