MDEV-30341 Reset check_foreigns, check_unique_secondary variables

- InnoDB fails to reset the check_foreigns and check_unique_secondary
in trx_t::free(), trx_t::commit_cleanup(). This lead to bulk insert
in internal innodb fts table operation.
parent 085d0ac2
......@@ -1070,6 +1070,8 @@ struct trx_t : ilist_node<>
ut_ad(!dict_operation);
ut_ad(!apply_online_log);
ut_ad(!is_not_inheriting_locks());
ut_ad(check_foreigns);
ut_ad(check_unique_secondary);
}
/** This has to be invoked on SAVEPOINT or at the end of a statement.
......
......@@ -385,9 +385,10 @@ void trx_t::free()
dict_operation= false;
trx_sys.deregister_trx(this);
check_unique_secondary= true;
check_foreigns= true;
assert_freed();
trx_sys.rw_trx_hash.put_pins(this);
mysql_thd= nullptr;
// FIXME: We need to avoid this heap free/alloc for each commit.
......@@ -1378,6 +1379,8 @@ void trx_t::commit_cleanup()
state= TRX_STATE_NOT_STARTED;
mod_tables.clear();
check_foreigns= true;
check_unique_secondary= true;
assert_freed();
trx_init(this);
mutex.wr_unlock();
......
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