# DB-756 verify that cardinality is picked from the partition where the rows are mapped.  in this case, the first partition.
source include/have_tokudb.inc;
source include/have_partition.inc;
set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t;
enable_warnings;

# this test is explicitly testing analyze functionality so we need to disable
# the auto and background analysis (on by default in 5.7) for this test
set session tokudb_auto_analyze = 0;
set session tokudb_analyze_in_background = 0;

create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
insert into t values (2,1),(4,1),(6,1);
show indexes from t;
analyze table t;
show indexes from t;
drop table t;
