diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2022-10-25 12:12:33 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2022-10-25 12:12:33 +0530 |
commit | f70960c3482073d2edd4a809899adee56c94ec24 (patch) | |
tree | 50e371b6e39dfded3fd48dfe6aaed7a6c06fda7e /mysql-test/suite/innodb/t/insert_into_empty.test | |
parent | 0f93d80337717b1bef1850dc9b980bb041b173c1 (diff) | |
download | mariadb-git-f70960c3482073d2edd4a809899adee56c94ec24.tar.gz |
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
Diffstat (limited to 'mysql-test/suite/innodb/t/insert_into_empty.test')
-rw-r--r-- | mysql-test/suite/innodb/t/insert_into_empty.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test index 8b885cb5b4f..4181087472f 100644 --- a/mysql-test/suite/innodb/t/insert_into_empty.test +++ b/mysql-test/suite/innodb/t/insert_into_empty.test @@ -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; |