summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2010-11-30 18:52:38 +0100
committerJon Olav Hauglid <jon.hauglid@oracle.com>2010-11-30 18:52:38 +0100
commita186085a077c3f22827496a86c4029c8fd1384af (patch)
treebd6cf48210e66b5715547f3f8db22e3f1a4eaf60 /sql/sp.cc
parente3cbf205547e4b8e34438ab7413af409a6873731 (diff)
downloadmariadb-git-a186085a077c3f22827496a86c4029c8fd1384af.tar.gz
Bug #58414 mysql_upgrade fails on dump upgrade between 5.1.53 -> 5.5.8
The problem was that mysql_upgrade failed because DROP DATABASE refused to drop the 'performance_schema' database when the mysql.proc table definition was made temporarily invalid by dump import. This patch fixes the problem by adding the error resulting from opening a damaged mysq.proc table (ER_CANNOT_LOAD_FROM_TABLE), to the list of errors DROP DATABASE will ignore when trying to lock stored procedures and functions before deletion. This problem was a regression introduced by the patch for Bug#57663. Test case added to sp-destruct.test.
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 71a5afb437c..ae11c2ad14c 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -1372,6 +1372,8 @@ public:
MYSQL_ERROR ** cond_hdl)
{
if (sql_errno == ER_NO_SUCH_TABLE ||
+ sql_errno == ER_CANNOT_LOAD_FROM_TABLE ||
+ sql_errno == ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE ||
sql_errno == ER_COL_COUNT_DOESNT_MATCH_CORRUPTED)
return true;
return false;