Skip to content
Permalink
Browse files
MDEV-18747 InnoDB: Failing assertion: table->get_ref_count() == 0 upo…
…n dropping temporary table with unique blob

delete update handler clone also for temporary tables
  • Loading branch information
vuvova committed Feb 28, 2019
1 parent 304f008 commit 9fd3e81
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
@@ -49,3 +49,7 @@ pk f row_end > DATE'2030-01-01'
1 foo 0
1 bar 0
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';
select * from t1;
select pk, f, row_end > DATE'2030-01-01' from t1 for system_time all;
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()
{
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);
}
}

0 comments on commit 9fd3e81

Please sign in to comment.