diff options
author | Monty <monty@mariadb.org> | 2016-06-19 15:07:03 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2016-06-22 22:04:55 +0300 |
commit | ec38c7e60bf8dbe54b1551e75254337bec1993a4 (patch) | |
tree | 64fb1b0876a0461581f4b565b2610cb97d817848 | |
parent | 838205f0bb3a818e05e34c25d55053a9a2a1487e (diff) | |
download | mariadb-git-ec38c7e60bf8dbe54b1551e75254337bec1993a4.tar.gz |
MDEV-10219 rpl.rpl_parallel_temptable failed in buildbot: Assertion `!table || !table->in_use || table->in_use == _current_thd()' failed
Problem was that table->in_use was not properly set when dropping a temporary for the slave.
-rw-r--r-- | sql/temporary_tables.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc index c40ea511aac..9a85c09b08e 100644 --- a/sql/temporary_tables.cc +++ b/sql/temporary_tables.cc @@ -635,6 +635,12 @@ bool THD::drop_temporary_table(TABLE *table, */ while ((tab= share->all_tmp_tables.pop_front())) { + /* + We need to set the THD as it may be different in case of + parallel replication + */ + tab->in_use= this; + free_temporary_table(tab); } @@ -1188,6 +1194,8 @@ bool THD::use_temporary_table(TABLE *table, TABLE **out_table) DBUG_ENTER("THD::use_temporary_table"); *out_table= table; + + /* The following can happen if find_temporary_table() returns NULL */ if (!table) DBUG_RETURN(false); @@ -1215,10 +1223,7 @@ bool THD::use_temporary_table(TABLE *table, TABLE **out_table) We need to set the THD as it may be different in case of parallel replication */ - if (table->in_use != this) - { - table->in_use= this; - } + table->in_use= this; DBUG_RETURN(false); } |