Commit bf995a09 authored by Alexander Nozdrin's avatar Alexander Nozdrin

Merge 5.1-bugteam -> trunk-alik (up to revno:3111).

parents 8fc0757f 4d6bf3ce
...@@ -180,8 +180,6 @@ NULL mysqltest_db1 trg5 DELETE NULL mysqltest_db1 t1 0 NULL SET @a = 5 ROW BEFOR ...@@ -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_dfn@localhost;
DROP USER mysqltest_inv@localhost; DROP USER mysqltest_inv@localhost;
DROP DATABASE mysqltest_db1; 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.user WHERE User LIKE 'mysqltest_%';
DELETE FROM mysql.db WHERE User LIKE 'mysqltest_%'; DELETE FROM mysql.db WHERE User LIKE 'mysqltest_%';
DELETE FROM mysql.tables_priv WHERE User LIKE 'mysqltest_%'; DELETE FROM mysql.tables_priv WHERE User LIKE 'mysqltest_%';
......
...@@ -12,11 +12,11 @@ let $MYSQLD_DATADIR= `select @@datadir`; ...@@ -12,11 +12,11 @@ let $MYSQLD_DATADIR= `select @@datadir`;
drop table if exists t1; drop table if exists t1;
create table t1 (a int) engine=myisam; create table t1 (a int) engine=myisam;
--remove_file $MYSQLD_DATADIR/test/t1.MYI --remove_file $MYSQLD_DATADIR/test/t1.MYI
--error 1051,6 --error ER_BAD_TABLE_ERROR,6
drop table t1; drop table t1;
create table t1 (a int) engine=myisam; create table t1 (a int) engine=myisam;
--remove_file $MYSQLD_DATADIR/test/t1.MYD --remove_file $MYSQLD_DATADIR/test/t1.MYD
--error 1105,6,29 --error ER_BAD_TABLE_ERROR,6,29
drop table t1; drop table t1;
--error 1051 --error ER_BAD_TABLE_ERROR
drop table t1; drop table t1;
...@@ -907,6 +907,9 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) ...@@ -907,6 +907,9 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
remove_db_from_cache(db); remove_db_from_cache(db);
pthread_mutex_unlock(&LOCK_open); pthread_mutex_unlock(&LOCK_open);
Drop_table_error_handler err_handler(thd->get_internal_handler());
thd->push_internal_handler(&err_handler);
error= -1; error= -1;
/* /*
We temporarily disable the binary log while dropping the objects 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) ...@@ -939,6 +942,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
error = 0; error = 0;
reenable_binlog(thd); reenable_binlog(thd);
} }
thd->pop_internal_handler();
} }
if (!silent && deleted>=0) if (!silent && deleted>=0)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment