2011-04-27 14:16:09 +00:00
|
|
|
# test that deletes work when hot indexing is on
|
|
|
|
|
|
|
|
set storage_engine='tokudb';
|
|
|
|
|
|
|
|
--echo # Establish connection conn1 (user = root)
|
|
|
|
connect (conn1,localhost,root,,);
|
|
|
|
|
|
|
|
connection default;
|
|
|
|
|
|
|
|
# create table s
|
|
|
|
--disable_warnings
|
|
|
|
drop table if exists s;
|
|
|
|
--enable_warnings
|
|
|
|
create table s (a int, b int);
|
|
|
|
|
|
|
|
# populate table s
|
|
|
|
let $a = 10000;
|
|
|
|
while ($a) {
|
|
|
|
eval insert into s values ($a,0),($a,1),($a,2),($a,3),($a,4),($a,5),($a,6),($a,7),($a,8),($a,9);
|
|
|
|
dec $a;
|
|
|
|
}
|
|
|
|
|
|
|
|
set tokudb_create_index_online=1;
|
|
|
|
send create clustering index i_a on s(a);
|
|
|
|
|
|
|
|
connection conn1;
|
|
|
|
let $b=10000;
|
|
|
|
while ($b) {
|
|
|
|
eval insert into s values (1000000000,$b);
|
|
|
|
dec $b;
|
|
|
|
}
|
|
|
|
|
|
|
|
connection default;
|
|
|
|
reap;
|
2011-04-27 17:15:09 +00:00
|
|
|
select count(*) from s use index();
|
2011-04-27 14:16:09 +00:00
|
|
|
select count(*) from s use index(i_a);
|
|
|
|
disconnect conn1;
|
|
|
|
|
|
|
|
#cleanup
|
|
|
|
drop table s;
|