mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
28 lines
573 B
Text
28 lines
573 B
Text
|
# test that add and drop works
|
||
|
|
||
|
source include/have_tokudb.inc;
|
||
|
|
||
|
disable_warnings;
|
||
|
drop table if exists tt;
|
||
|
enable_warnings;
|
||
|
|
||
|
create table tt (a int, b int, c int, d int, key(a), key(b), key(c));
|
||
|
insert into tt values (0,0,0,0),(1,0,0,0),(2,0,1,0),(3,0,1,0);
|
||
|
|
||
|
# test that analyze computes the correcK
|
||
|
show indexes from tt;
|
||
|
analyze table tt;
|
||
|
show indexes from tt;
|
||
|
|
||
|
# drop b, add d
|
||
|
alter table tt drop key b, add key (d);
|
||
|
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;
|