summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb/t/card_pk_2.test
blob: 826714931aa5bb4bde487d342be3c76c6704fda5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
source include/have_tokudb.inc;
set default_storage_engine='tokudb';

disable_warnings;
drop table if exists tt;
enable_warnings;

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;

drop table tt;