summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb/t/hotindex-update-1.test
blob: 1038a633b52a26181e16336f6019ea0c4c5ee71c (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# This test takes rather long time so let us run it only in --big-test mode
--source include/big_test.inc
# test that deletes work when hot indexing is on

SET DEFAULT_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
begin;
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;
}
commit;

set tokudb_create_index_online=1;
send create index i_a on s(a) clustering=yes;

connection conn1;
let $a = 10000;
while ($a) {
    eval update s set a=20000+$a where a=$a;
    dec $a;
}

connection default;
reap;
disconnect conn1;

#cleanup
drop table s;