mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix Bug#53046 dict_update_statistics_low can still be run concurrently on same table
Replace the array of mutexes that used to protect dict_index_t::stat_n_diff_key_vals[] with an array of rw locks that protects all the stats related members in dict_table_t and all of its indexes. Approved by: Jimmy (rb://503)
This commit is contained in:
@ -871,7 +871,8 @@ row_update_statistics_if_needed(
|
||||
if (counter > 2000000000
|
||||
|| ((ib_int64_t)counter > 16 + table->stat_n_rows / 16)) {
|
||||
|
||||
dict_update_statistics(table);
|
||||
dict_update_statistics(table, FALSE /* update even if stats
|
||||
are initialized */);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2953,7 +2954,8 @@ next_rec:
|
||||
dict_table_autoinc_lock(table);
|
||||
dict_table_autoinc_initialize(table, 1);
|
||||
dict_table_autoinc_unlock(table);
|
||||
dict_update_statistics(table);
|
||||
dict_update_statistics(table, FALSE /* update even if stats are
|
||||
initialized */);
|
||||
|
||||
trx_commit_for_mysql(trx);
|
||||
|
||||
|
Reference in New Issue
Block a user