Commit ed5d675c authored by Aleksey Midenkov's avatar Aleksey Midenkov

MDEV-24364 Alter rename table does not remove PFS share

Add missed PSI_CALL_drop_table_share().
parent 113f1868
......@@ -164,3 +164,13 @@ Warnings:
Note 1051 Unknown table 'test.t0'
FLUSH TABLE t0;
DROP TABLE t0;
#
# MDEV-24364 Alter rename table does not remove PFS share
#
create or replace table yt4 (x int) engine innodb;
alter table yt4 rename to t1, algorithm=copy;
drop tables t1;
select object_type, object_schema, object_name
from performance_schema.objects_summary_global_by_type
where object_schema="test";
object_type object_schema object_name
......@@ -287,3 +287,14 @@ enable_query_log;
# an unexpected refcount.
FLUSH TABLE t0;
DROP TABLE t0;
--echo #
--echo # MDEV-24364 Alter rename table does not remove PFS share
--echo #
create or replace table yt4 (x int) engine innodb;
alter table yt4 rename to t1, algorithm=copy;
drop tables t1;
select object_type, object_schema, object_name
from performance_schema.objects_summary_global_by_type
where object_schema="test";
......@@ -10956,6 +10956,8 @@ do_continue:;
{
/* The original table is the backup */
backup_name= alter_ctx.table_name;
PSI_CALL_drop_table_share(0, alter_ctx.db.str, (int) alter_ctx.db.length,
alter_ctx.table_name.str, (int) alter_ctx.table_name.length);
}
// Rename the new table to the correct name.
......
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