--source include/have_binlog_format_row.inc connect(conn1, localhost, root,,); connect(conn2, localhost, root,,); connection conn1; set global opt_tablestat=on; set global opt_indexstat=on; create database db_1; create table db_1.t1( id int primary key auto_increment, col1 varchar(100), col2 int, key(col2) )engine= innodb; create temporary table db_1.t3( id int primary key auto_increment, col1 varchar(100), col2 int, key(col2) )engine= innodb; --disable_query_log let $loop=100; while($loop) { eval insert into db_1.t1(col1, col2) values(concat('test', $loop), $loop); eval insert into db_1.t3(col1, col2) values(concat('test', $loop), $loop); dec $loop; } insert into db_1.t1(col1,col2)select col1, col2 from db_1.t1; commit; --enable_query_log select count(*) from db_1.t1; select * from db_1.t1 where id=1; update db_1.t1 set col1='update' where id=1; delete from db_1.t1 where id=1; commit; select count(col2) from db_1.t3; drop table db_1.t3; disconnect conn1; connection conn2; select * from information_schema.table_statistics where table_schema='db_1' order by table_schema, table_name; select * from information_schema.index_statistics where table_schema='db_1' order by table_schema, table_name, index_name; select count(*) from performance_schema.memory_summary_global_by_event_name where event_name = 'memory/sql/object_statistics'; set global opt_tablestat = ON; set global opt_indexstat = ON; drop table db_1.t1; drop database db_1; disconnect conn2;