mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
continue DROP TEMPORARY TABLE t1, t2, t3 after error.
normal DROP TABLE with many tables continues after an error, trying to drop as many tables as possible. But DROP TEMPORARY TABLE was aborting on the first error. Change it to behave as DROP TABLE does.
This commit is contained in:
@ -6,11 +6,6 @@
|
||||
# Test of temporary tables
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2;
|
||||
drop view if exists v1;
|
||||
--enable_warnings
|
||||
|
||||
--echo #
|
||||
--echo # test basic creation of temporary tables together with normal table
|
||||
--echo #
|
||||
@ -658,3 +653,31 @@ DROP TEMPORARY TABLE t1;
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
||||
#
|
||||
# DROP TEMPORARY TABLE fails in the middle
|
||||
#
|
||||
delimiter $$;
|
||||
create function f1() returns int
|
||||
begin
|
||||
drop temporary table t1, t2;
|
||||
return 1;
|
||||
end;
|
||||
$$
|
||||
delimiter ;$$
|
||||
|
||||
create temporary table t1 (a int);
|
||||
create temporary table t2 (a int);
|
||||
insert t1 values (2);
|
||||
insert t2 values (3);
|
||||
--error ER_CANT_REOPEN_TABLE
|
||||
select a,f1() from t1;
|
||||
drop function f1;
|
||||
drop temporary table t1;
|
||||
--error ER_BAD_TABLE_ERROR
|
||||
drop temporary table t2;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
||||
|
Reference in New Issue
Block a user