mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
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.
This commit is contained in:
parent
e80183dbd5
commit
dc58987eb7
2 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue