#At file:///home/gluh/MySQL/mysql-5.1-bugteam/ based on revid:satya.bn@stripped
3111 Sergey Glukhov 2009-09-17
Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table
additional backport of of bug43138 fix
@ mysql-test/t/myisam-system.test
additional backport of of bug43138 fix
@ sql/sql_db.cc
additional backport of of bug43138 fix
modified:
mysql-test/t/myisam-system.test
sql/sql_db.cc
=== modified file 'mysql-test/t/myisam-system.test'
--- a/mysql-test/t/myisam-system.test 2007-12-12 17:19:24 +0000
+++ b/mysql-test/t/myisam-system.test 2009-09-17 09:42:36 +0000
@@ -12,11 +12,11 @@ let $MYSQLD_DATADIR= `select @@datadir`;
drop table if exists t1;
create table t1 (a int) engine=myisam;
--remove_file $MYSQLD_DATADIR/test/t1.MYI
---error 1051,6
+--error ER_BAD_TABLE_ERROR,6
drop table t1;
create table t1 (a int) engine=myisam;
--remove_file $MYSQLD_DATADIR/test/t1.MYD
---error 1105,6,29
+--error ER_BAD_TABLE_ERROR,6,29
drop table t1;
---error 1051
+--error ER_BAD_TABLE_ERROR
drop table t1;
=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc 2009-08-13 02:48:57 +0000
+++ b/sql/sql_db.cc 2009-09-17 09:42:36 +0000
@@ -907,6 +907,9 @@ bool mysql_rm_db(THD *thd,char *db,bool
remove_db_from_cache(db);
pthread_mutex_unlock(&LOCK_open);
+ Drop_table_error_handler err_handler(thd->get_internal_handler());
+ thd->push_internal_handler(&err_handler);
+
error= -1;
/*
We temporarily disable the binary log while dropping the objects
@@ -938,6 +941,7 @@ bool mysql_rm_db(THD *thd,char *db,bool
#endif
error = 0;
reenable_binlog(thd);
+ thd->pop_internal_handler();
}
}
if (!silent && deleted>=0)
Attachment: [text/bzr-bundle] bzr/sergey.glukhov@sun.com-20090917094236-5x1bgvyzjslyfm9r.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:3111)Bug#42364 | Sergey Glukhov | 17 Sep |