Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table
additional backport of of bug43138 fix
This commit is contained in:
parent
0b8243cb5b
commit
4d6bf3ce15
@ -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`;
|
|||||||
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)
|
|||||||
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)
|
|||||||
error = 0;
|
error = 0;
|
||||||
reenable_binlog(thd);
|
reenable_binlog(thd);
|
||||||
}
|
}
|
||||||
|
thd->pop_internal_handler();
|
||||||
}
|
}
|
||||||
if (!silent && deleted>=0)
|
if (!silent && deleted>=0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user