mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-5535: Cannot reopen temporary table
Temporary table being created by outer statement should not be visible to inner statement. And if inner statement creates a table with same name. The whole statement should fail with ER_TABLE_EXISTS_ERROR. Implemented by temporarily de-linking the TABLE_SHARE being created by outer statement so that it remains hidden to the inner statement.
This commit is contained in:
@@ -2231,7 +2231,7 @@ begin
|
||||
return 1;
|
||||
end|
|
||||
delimiter ;|
|
||||
--error ER_CANT_REOPEN_TABLE
|
||||
--error ER_BAD_TABLE_ERROR
|
||||
create temporary table t1 as select f1();
|
||||
|
||||
delimiter |;
|
||||
@@ -2241,7 +2241,7 @@ begin
|
||||
return 1;
|
||||
end|
|
||||
delimiter ;|
|
||||
--error ER_CANT_REOPEN_TABLE
|
||||
--error ER_BAD_TABLE_ERROR
|
||||
create temporary table t1 as select f2();
|
||||
|
||||
drop function f1;
|
||||
@@ -2259,7 +2259,7 @@ begin
|
||||
return 1;
|
||||
end|
|
||||
delimiter ;|
|
||||
--error ER_CANT_REOPEN_TABLE
|
||||
--error ER_BAD_TABLE_ERROR
|
||||
create temporary table t1 as select f2();
|
||||
|
||||
drop function f1;
|
||||
|
||||
Reference in New Issue
Block a user