1# 2# MDEV-23991 dict_table_stats_lock() has unnecessarily long scope 3# 4CREATE TABLE t1(a INT) ENGINE=INNODB STATS_PERSISTENT=1; 5SET DEBUG_SYNC='dict_stats_update_persistent SIGNAL stop WAIT_FOR go'; 6ANALYZE TABLE t1; 7connect con1, localhost, root; 8SET DEBUG_SYNC='now WAIT_FOR stop'; 9SELECT ENGINE,SUM(DATA_LENGTH+INDEX_LENGTH),COUNT(ENGINE),SUM(DATA_LENGTH),SUM(INDEX_LENGTH) FROM information_schema.TABLES WHERE ENGINE='InnoDB'; 10ENGINE SUM(DATA_LENGTH+INDEX_LENGTH) COUNT(ENGINE) SUM(DATA_LENGTH) SUM(INDEX_LENGTH) 11InnoDB 114688 4 65536 49152 12SET DEBUG_SYNC='now SIGNAL go'; 13disconnect con1; 14connection default; 15Table Op Msg_type Msg_text 16test.t1 analyze status Engine-independent statistics collected 17test.t1 analyze status OK 18SET DEBUG_SYNC= 'RESET'; 19DROP TABLE t1; 20