blob: b24ff0f26f03e22ecf1fc36bd1495bb4d93e2aa8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
source include/have_tokudb.inc;
set default_storage_engine='tokudb';
disable_warnings;
drop table if exists tt;
enable_warnings;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, primary key(a,b));
insert into tt values (0,0),(0,1),(1,0),(1,1);
# test that analyze computes the correct cardinality for the PK
show indexes from tt;
analyze table tt;
show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
|