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
017ba130
Commit
017ba130
authored
Mar 28, 2003
by
pem@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for thd->killed in execution loop. (Makes more graceful behaviour in
certain interrupt cases.)
parent
9b6d015a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
sql/sp_head.cc
sql/sp_head.cc
+7
-2
No files found.
sql/sp_head.cc
View file @
017ba130
...
@@ -136,6 +136,7 @@ sp_head::execute(THD *thd)
...
@@ -136,6 +136,7 @@ sp_head::execute(THD *thd)
int
ret
=
0
;
int
ret
=
0
;
uint
ip
=
0
;
uint
ip
=
0
;
LINT_INIT
(
olddbname
);
if
(
olddbptr
)
if
(
olddbptr
)
olddbname
=
my_strdup
(
olddbptr
,
MYF
(
MY_WME
));
olddbname
=
my_strdup
(
olddbptr
,
MYF
(
MY_WME
));
...
@@ -148,15 +149,19 @@ sp_head::execute(THD *thd)
...
@@ -148,15 +149,19 @@ sp_head::execute(THD *thd)
break
;
break
;
DBUG_PRINT
(
"execute"
,
(
"Instruction %u"
,
ip
));
DBUG_PRINT
(
"execute"
,
(
"Instruction %u"
,
ip
));
ret
=
i
->
execute
(
thd
,
&
ip
);
ret
=
i
->
execute
(
thd
,
&
ip
);
}
while
(
ret
==
0
);
}
while
(
ret
==
0
&&
!
thd
->
killed
);
DBUG_PRINT
(
"info"
,
(
"ret=%d killed=%d"
,
ret
,
thd
->
killed
));
if
(
thd
->
killed
)
ret
=
-
1
;
/* If the DB has changed, the pointer has changed too, but the
/* If the DB has changed, the pointer has changed too, but the
original thd->db will then have been freed */
original thd->db will then have been freed */
if
(
olddbptr
&&
olddbptr
!=
thd
->
db
&&
olddbname
)
if
(
olddbptr
&&
olddbptr
!=
thd
->
db
&&
olddbname
)
{
{
/* QQ Maybe we should issue some special error message or warning here,
/* QQ Maybe we should issue some special error message or warning here,
if this fails?? */
if this fails?? */
ret
=
mysql_change_db
(
thd
,
olddbname
);
if
(
!
thd
->
killed
)
ret
=
mysql_change_db
(
thd
,
olddbname
);
my_free
(
olddbname
,
MYF
(
0
));
my_free
(
olddbname
,
MYF
(
0
));
}
}
DBUG_RETURN
(
ret
);
DBUG_RETURN
(
ret
);
...
...
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