--source include/have_ndb.inc --source include/have_log_bin.inc set @is_enable_default = @@global.ndb_index_stat_enable; set @is_enable = 1; source index_stat_enable.inc; create table t1 ( a int primary key, b int, c int, key t1x1 (b), key t1x2 (c) ) engine=ndb partition by key (a) partitions 1; insert into t1 values (1,1,1),(2,1,1),(3,2,1),(4,2,1); analyze table t1; # put some entries into index stats cache select count(*) from t1 where b = 1; select count(*) from t1 where c = 1; show status like 'ndb_index_stat_cache%'; --echo # restart cluster --initial --exec $NDB_MGM -e "all restart -i -n" >> $NDB_TOOLS_OUTPUT --exec $NDB_WAITER --not-started >> $NDB_TOOLS_OUTPUT --exec $NDB_MGM -e "all start" >> $NDB_TOOLS_OUTPUT --exec $NDB_WAITER >> $NDB_TOOLS_OUTPUT --echo # wait for mysqld --source include/ndb_not_readonly.inc # wait for stats thread to re-initialize --source suite/ndb/include/ndb_index_stat_wait.inc --error 0,1193 set global ndb_dbg_check_shares=1; --error 0,1051 drop table if exists t1; create table t1 ( a int primary key, b int, c int, key t1x1 (b), key t1x2 (c) ) engine=ndb partition by key (a) partitions 1; insert into t1 values (1,1,1),(2,1,1),(3,2,1),(4,2,1); analyze table t1; # put some entries into index stats cache select count(*) from t1 where b = 1; select count(*) from t1 where c = 1; show status like 'ndb_index_stat_cache%'; drop table t1; set @is_enable = @is_enable_default; source index_stat_enable.inc; # Ignore the warning generated by ndbcluster's binlog thread # when cluster is restarted --disable_query_log ONCE call mtr.add_suppression("cluster disconnect An incident event has been written"); # Ignore the warning generated by ndbcluster's binlog thread # when cluster is restarted - also on the second mysqld connect(mysqld2,127.0.0.1,root,,test,$MASTER_MYPORT1); connection mysqld2; --disable_query_log ONCE call mtr.add_suppression("cluster disconnect An incident event has been written"); --remove_file $NDB_TOOLS_OUTPUT