diff options
-rw-r--r-- | mysql-test/r/trigger_notembedded.result | 2 | ||||
-rw-r--r-- | mysql-test/t/myisam-system.test | 6 | ||||
-rw-r--r-- | sql/sql_db.cc | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/mysql-test/r/trigger_notembedded.result b/mysql-test/r/trigger_notembedded.result index 335e6910a3a..d66308a9bd7 100644 --- a/mysql-test/r/trigger_notembedded.result +++ b/mysql-test/r/trigger_notembedded.result @@ -180,8 +180,6 @@ NULL mysqltest_db1 trg5 DELETE NULL mysqltest_db1 t1 0 NULL SET @a = 5 ROW BEFOR DROP USER mysqltest_dfn@localhost; DROP USER mysqltest_inv@localhost; DROP DATABASE mysqltest_db1; -Warnings: -Warning 1454 No definer attribute for trigger 'mysqltest_db1'.'trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger. DELETE FROM mysql.user WHERE User LIKE 'mysqltest_%'; DELETE FROM mysql.db WHERE User LIKE 'mysqltest_%'; DELETE FROM mysql.tables_priv WHERE User LIKE 'mysqltest_%'; diff --git a/mysql-test/t/myisam-system.test b/mysql-test/t/myisam-system.test index dc5bb58b6a2..d908e639a4e 100644 --- a/mysql-test/t/myisam-system.test +++ b/mysql-test/t/myisam-system.test @@ -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; diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 3fca5bd7df6..bcc8fcf54fc 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -907,6 +907,9 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) 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 @@ -939,6 +942,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) error = 0; reenable_binlog(thd); } + thd->pop_internal_handler(); } if (!silent && deleted>=0) { |