diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2023-02-21 16:25:17 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2023-03-02 15:49:21 +0530 |
commit | 49e2b50d594dfee462505b8fab2d8ba875dcf6e0 (patch) | |
tree | 9c364fa6aa0bc69480c5863b184c064d663176b3 /storage | |
parent | 085d0ac23868603bc7400d4b0949c63ce3a85a31 (diff) | |
download | mariadb-git-49e2b50d594dfee462505b8fab2d8ba875dcf6e0.tar.gz |
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.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/include/trx0trx.h | 2 | ||||
-rw-r--r-- | storage/innobase/trx/trx0trx.cc | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index ad941b89691..21e4516f35a 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -1070,6 +1070,8 @@ public: 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. diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index 1516968f3b8..a0c781f6287 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -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(); |