1 # turn ndb_index_stat_enable ON or OFF
2 # caller sets @is_enable 0/1
3 # based on global variable, local follows global
4 # do nothing if value is already correct
5 # setting OFF drops stats tables to avoid MTR diff
7 let is_enable_on = `select @is_enable and not @@global.ndb_index_stat_enable`;
8 let is_enable_off = `select not @is_enable and @@global.ndb_index_stat_enable`;
11 --echo # is_enable_on=$is_enable_on is_enable_off=$is_enable_off
13 --echo # ndb_index_stat_enable - before
14 show global variables like
'ndb_index_stat_enable';
15 show local variables like
'ndb_index_stat_enable';
20 eval
set @@global.ndb_index_stat_enable = 1;
21 eval
set @@local.ndb_index_stat_enable = 1;
23 # stats thread creates stats tables
29 eval
set @@local.ndb_index_stat_enable = 0;
30 eval
set @@global.ndb_index_stat_enable = 0;
32 # stats thread does not (and must not) drop stats tables
33 eval drop
table mysql.ndb_index_stat_sample;
34 eval drop
table mysql.ndb_index_stat_head;
37 --echo # ndb_index_stat_enable - after
38 show global variables like
'ndb_index_stat_enable';
39 show local variables like
'ndb_index_stat_enable';