mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-28327 InnoDB persistent statistics fail to update after bulk insert
- Background statistics thread should keep the table in the statistics queue itself when the table under bulk insert operation dict_stats_analyze_index(): Set the maximum value for index_stats_t if the table is in bulk operation dict_stats_update(), dict_stats_update_transient_for_index(), dict_stats_update_transient(): Returns DB_SUCCESS_LOCKED_REC if the table under bulk insert operation dict_stats_process_entry_from_recalc_pool(): Add the table back to recalc pool if the table under bulk insert operation
This commit is contained in:
@ -193,3 +193,16 @@ CREATE TABLE t (i INT) ENGINE=InnoDB PARTITION BY HASH (i) PARTITIONS 2;
|
||||
INSERT INTO t VALUES (0);
|
||||
INSERT INTO t VALUES (1),(0),(1);
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28327 InnoDB persistent statistics fail to update
|
||||
--echo # after bulk insert
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY)ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT * FROM seq_1_to_4096;
|
||||
--echo # Wait till statistics update after bulk insert operation
|
||||
let $wait_condition= select n_rows > 100 from mysql.innodb_table_stats
|
||||
where table_name="t1";
|
||||
source include/wait_condition.inc;
|
||||
SELECT n_rows FROM mysql.innodb_table_stats WHERE TABLE_NAME="t1";
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user