Commit 9fd3e810 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-18747 InnoDB: Failing assertion: table->get_ref_count() == 0 upon...

MDEV-18747 InnoDB: Failing assertion: table->get_ref_count() == 0 upon dropping temporary table with unique blob

delete update handler clone also for temporary tables
parent 304f0084
...@@ -49,3 +49,7 @@ pk f row_end > DATE'2030-01-01' ...@@ -49,3 +49,7 @@ pk f row_end > DATE'2030-01-01'
1 foo 0 1 foo 0
1 bar 0 1 bar 0
drop table t1; drop table t1;
create temporary table t1 (f blob, unique(f)) engine=innodb;
insert into t1 values (1);
replace into t1 values (1);
drop table t1;
...@@ -56,3 +56,11 @@ update t1 set f = 'foo'; ...@@ -56,3 +56,11 @@ update t1 set f = 'foo';
select * from t1; select * from t1;
select pk, f, row_end > DATE'2030-01-01' from t1 for system_time all; select pk, f, row_end > DATE'2030-01-01' from t1 for system_time all;
drop table t1; drop table t1;
#
# MDEV-18747 InnoDB: Failing assertion: table->get_ref_count() == 0 upon dropping temporary table with unique blob
#
create temporary table t1 (f blob, unique(f)) engine=innodb;
insert into t1 values (1);
replace into t1 values (1);
drop table t1;
...@@ -731,6 +731,8 @@ void THD::mark_tmp_tables_as_free_for_reuse() ...@@ -731,6 +731,8 @@ void THD::mark_tmp_tables_as_free_for_reuse()
{ {
if ((table->query_id == query_id) && !table->open_by_handler) if ((table->query_id == query_id) && !table->open_by_handler)
{ {
if (table->update_handler)
table->delete_update_handler();
mark_tmp_table_as_free_for_reuse(table); mark_tmp_table_as_free_for_reuse(table);
} }
} }
......
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