mirror of
https://github.com/MariaDB/server.git
synced 2025-06-16 11:21:15 +03:00
MDEV-30429 InnoDB: Failing assertion: stat_value != UINT64_UNDEFINED in storage/innobase/dict/dict0stats.cc line 3647
In dict_stats_analyze_index(), InnoDB sets the maximum value for index_stats_t to indicate the bulk under bulk insert operation. But InnoDB fails to empty the statistics of the table in that case.
This commit is contained in:
@ -3008,6 +3008,7 @@ dict_stats_update_persistent(
|
|||||||
index_stats_t stats = dict_stats_analyze_index(index);
|
index_stats_t stats = dict_stats_analyze_index(index);
|
||||||
|
|
||||||
if (stats.is_bulk_operation()) {
|
if (stats.is_bulk_operation()) {
|
||||||
|
dict_stats_empty_table(table, false);
|
||||||
return DB_SUCCESS_LOCKED_REC;
|
return DB_SUCCESS_LOCKED_REC;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3050,6 +3051,12 @@ dict_stats_update_persistent(
|
|||||||
stats = dict_stats_analyze_index(index);
|
stats = dict_stats_analyze_index(index);
|
||||||
table->stats_mutex_lock();
|
table->stats_mutex_lock();
|
||||||
|
|
||||||
|
if (stats.is_bulk_operation()) {
|
||||||
|
table->stats_mutex_unlock();
|
||||||
|
dict_stats_empty_table(table, false);
|
||||||
|
return DB_SUCCESS_LOCKED_REC;
|
||||||
|
}
|
||||||
|
|
||||||
index->stat_index_size = stats.index_size;
|
index->stat_index_size = stats.index_size;
|
||||||
index->stat_n_leaf_pages = stats.n_leaf_pages;
|
index->stat_n_leaf_pages = stats.n_leaf_pages;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user