Debian Codegraph @

mysql-test/suite/ndb_opt/index_stat_restart.result

raw
1 set @is_enable_default = @@global.ndb_index_stat_enable;
2 set @is_enable = 1;
3 set @is_enable = NULL;
4 # is_enable_on=0 is_enable_off=0
5 # ndb_index_stat_enable - before
6 show global variables like 'ndb_index_stat_enable';
7 Variable_name Value
8 ndb_index_stat_enable ON
9 show local variables like 'ndb_index_stat_enable';
10 Variable_name Value
11 ndb_index_stat_enable ON
12 # ndb_index_stat_enable - after
13 show global variables like 'ndb_index_stat_enable';
14 Variable_name Value
15 ndb_index_stat_enable ON
16 show local variables like 'ndb_index_stat_enable';
17 Variable_name Value
18 ndb_index_stat_enable ON
19 create table t1 (
20 a int primary key,
21 b int,
22 c int,
23 key t1x1 (b),
24 key t1x2 (c)
25 ) engine=ndb
26 partition by key (a) partitions 1;
27 insert into t1 values (1,1,1),(2,1,1),(3,2,1),(4,2,1);
28 analyze table t1;
29 Table Op Msg_type Msg_text
30 test.t1 analyze status OK
31 select count(*) from t1 where b = 1;
32 count(*)
33 2
34 select count(*) from t1 where c = 1;
35 count(*)
36 4
37 show status like 'ndb_index_stat_cache%';
38 Variable_name Value
39 Ndb_index_stat_cache_query 81
40 Ndb_index_stat_cache_clean 0
41 # restart cluster --initial
42 # wait for mysqld
43 set global ndb_dbg_check_shares=1;
44 drop table if exists t1;
45 Warnings:
46 Note 1051 Unknown table 'test.t1'
47 create table t1 (
48 a int primary key,
49 b int,
50 c int,
51 key t1x1 (b),
52 key t1x2 (c)
53 ) engine=ndb
54 partition by key (a) partitions 1;
55 insert into t1 values (1,1,1),(2,1,1),(3,2,1),(4,2,1);
56 analyze table t1;
57 Table Op Msg_type Msg_text
58 test.t1 analyze status OK
59 select count(*) from t1 where b = 1;
60 count(*)
61 2
62 select count(*) from t1 where c = 1;
63 count(*)
64 4
65 show status like 'ndb_index_stat_cache%';
66 Variable_name Value
67 Ndb_index_stat_cache_query 81
68 Ndb_index_stat_cache_clean 0
69 drop table t1;
70 set @is_enable = @is_enable_default;
71 set @is_enable = NULL;
72 # is_enable_on=0 is_enable_off=0
73 # ndb_index_stat_enable - before
74 show global variables like 'ndb_index_stat_enable';
75 Variable_name Value
76 ndb_index_stat_enable ON
77 show local variables like 'ndb_index_stat_enable';
78 Variable_name Value
79 ndb_index_stat_enable ON
80 # ndb_index_stat_enable - after
81 show global variables like 'ndb_index_stat_enable';
82 Variable_name Value
83 ndb_index_stat_enable ON
84 show local variables like 'ndb_index_stat_enable';
85 Variable_name Value
86 ndb_index_stat_enable ON