call mtr.add_suppression("bytes freed by");
SET @old_innodb_stats_persistent = @@innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent=1;
CREATE TABLE t ENGINE=InnoDB AS SELECT 1;
SET @old_debug_dbug = @@global.debug_dbug;
XA START 'a';
INSERT INTO mysql.innodb_index_stats SELECT '','' AS table_name,index_name,LAST_UPDATE,stat_name,0 AS stat_value,sample_size,stat_description FROM mysql.innodb_index_stats WHERE table_name='dummy' FOR UPDATE;
SET GLOBAL debug_dbug = "+d,dict_stats_save_exit_notify";
INSERT INTO t VALUES (1), (2);
XA END 'a';
XA PREPARE 'a';
SET DEBUG_SYNC="now WAIT_FOR dict_stats_save_finished";
SET @@global.debug_dbug = @old_debug_dbug;
SET DEBUG_SYNC="RESET";
SET GLOBAL innodb_stats_persistent = @old_innodb_stats_persistent;
XA COMMIT 'a';
DROP TABLE t;
