1
0
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:
Nirbhay Choubey
2016-06-10 16:58:08 -04:00
parent 7305be2f7e
commit e2087c6e8d
7 changed files with 142 additions and 7 deletions

View File

@@ -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;