summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-11-10 16:14:53 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-11-10 16:14:53 -0200
commitc34c66650deabf97764e8aba55c168e41ab69647 (patch)
tree12d776ecc164f316c95e760167e3a39920f3cd15 /sql/sp.cc
parent9cfd2fce0cd72a2600b60ed182b808210cef88e5 (diff)
downloadmariadb-git-c34c66650deabf97764e8aba55c168e41ab69647.tar.gz
Backport of Bug#32140 to mysql-next-mr
------------------------------------------------------------ revno: 2618 revision-id: sp1r-davi@mysql.com/endora.local-20080418131946-26951 parent: sp1r-davi@mysql.com/endora.local-20080417190810-26185 committer: davi@mysql.com/endora.local timestamp: Fri 2008-04-18 10:19:46 -0300 message: Bug#32140: wrong error code caught when an SF() call is interruped with KILL query The problem is that killing a query which calls a stored function could return a wrong error (table corrupt) instead of the query interrupted error message. The solution is to not set the table corrupt error if the query is killed, the query interrupted error message will be set later when the query is finished. sql/sp.cc: Don't set a error if the thread was killed, the query interrupted error will be set later.
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 9d5efe227dc..8beaa96be54 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -1711,6 +1711,9 @@ sp_cache_routines_and_add_tables_aux(THD *thd, LEX *lex,
ret= SP_OK;
break;
default:
+ /* Query might have been killed, don't set error. */
+ if (thd->killed)
+ break;
/*
Any error when loading an existing routine is either some problem
with the mysql.proc table, or a parse error because the contents