diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-07-14 14:26:49 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-07-14 14:26:49 +0530 |
commit | dc58987eb7112bd60122114abd56e6f9438f457f (patch) | |
tree | b83bc4e410295a2592ecdbe3ab48e6e2df9f60aa /storage/xtradb | |
parent | e80183dbd595984a42e1265d7a257d8ca14b3bb8 (diff) | |
download | mariadb-git-dc58987eb7112bd60122114abd56e6f9438f457f.tar.gz |
MDEV-22765 i_s_fts_index_cache_fill_one_index() is not protect by the lock
- i_s_fts_index_cache_fill() should take shared lock of fts cache
before accessing index cache to avoid reading stale data.
Diffstat (limited to 'storage/xtradb')
-rw-r--r-- | storage/xtradb/handler/i_s.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/xtradb/handler/i_s.cc b/storage/xtradb/handler/i_s.cc index 8eb53502da8..8d7612ab16d 100644 --- a/storage/xtradb/handler/i_s.cc +++ b/storage/xtradb/handler/i_s.cc @@ -3367,6 +3367,8 @@ no_fts: conv_str.f_len = sizeof word; conv_str.f_str = word; + rw_lock_s_lock(&cache->lock); + for (ulint i = 0; i < ib_vector_size(cache->indexes); i++) { fts_index_cache_t* index_cache; @@ -3377,6 +3379,7 @@ no_fts: index_cache, thd, &conv_str, tables)); } + rw_lock_s_unlock(&cache->lock); dict_table_close(user_table, FALSE, FALSE); rw_lock_s_unlock(&dict_operation_lock); |