diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-01-26 20:09:39 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-01-26 20:10:17 +0530 |
commit | 968215ee769c9333d3ff07e6e0d3fcbd4e0ecb2d (patch) | |
tree | 87de5b803c35a0d624f620c8f7da6ecb520312ca | |
parent | 0565d199737a8412d592c32f315eced33efac7e4 (diff) | |
download | mariadb-git-bb-10.5-MDEV-24693.tar.gz |
MDEV-24693 LeakSanitizer: detected memory leaks in mem_heap_create_block_func / fts_optimize_create_msgbb-10.5-MDEV-24693
- 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; |