diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-01-26 20:09:39 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-01-27 20:41:36 +0530 |
commit | 700ae20d458ff47f53a4df0cf9f1283b015a6bd9 (patch) | |
tree | cffc08895a9041126d974126404913b69926d9a3 | |
parent | 30379d906b565fbf894d011c5e4f2a3f8ad23dcb (diff) | |
download | mariadb-git-700ae20d458ff47f53a4df0cf9f1283b015a6bd9.tar.gz |
MDEV-24693 LeakSanitizer: detected memory leaks in mem_heap_create_block_func / fts_optimize_create_msg
- This issue is caused by the commit bf1f9b59c7d0b619d8bf350b96436970c6edc118
(MDEV-24638). Delay the creation of SYNC message in
fts_optimize_request_sync_table. So that InnoDB can avoid creating
the message if the table already has SYNC message in fts_optimize_wq queue
-rw-r--r-- | storage/innobase/fts/fts0opt.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc index e69aa93b6d8..e3c0f8f56e4 100644 --- a/storage/innobase/fts/fts0opt.cc +++ b/storage/innobase/fts/fts0opt.cc @@ -2654,8 +2654,6 @@ fts_optimize_request_sync_table( return; } - fts_msg_t* msg = fts_optimize_create_msg(FTS_MSG_SYNC_TABLE, table); - mutex_enter(&fts_optimize_wq->mutex); if (table->fts->sync_message) { @@ -2665,6 +2663,8 @@ fts_optimize_request_sync_table( return; } + fts_msg_t* msg = fts_optimize_create_msg(FTS_MSG_SYNC_TABLE, table); + add_msg(msg, true); table->fts->sync_message = true; |