diff options
Diffstat (limited to 'storage/tokudb/mysql-test/tokudb/t/hotindex-del-1.test')
-rw-r--r-- | storage/tokudb/mysql-test/tokudb/t/hotindex-del-1.test | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/storage/tokudb/mysql-test/tokudb/t/hotindex-del-1.test b/storage/tokudb/mysql-test/tokudb/t/hotindex-del-1.test new file mode 100644 index 00000000000..fc8107d2bc0 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb/t/hotindex-del-1.test @@ -0,0 +1,40 @@ +# 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 +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 index i_a on s(a) clustering=yes; + +connection conn1; +let $a = 10000; +while ($a) { + eval delete from s where a=$a; + dec $a; +} + +connection default; +reap; +select count(*) from s use index(); +select count(*) from s use index(i_a); +disconnect conn1; + +#cleanup +drop table s; |