mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
[t:3406], add test
git-svn-id: file:///svn/mysql/tests/mysql-test@30361 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
0732111dc5
commit
dce6e940e7
2 changed files with 69 additions and 0 deletions
19
mysql-test/suite/tokudb.hotindex/r/hotindex-insert-2.result
Normal file
19
mysql-test/suite/tokudb.hotindex/r/hotindex-insert-2.result
Normal file
|
@ -0,0 +1,19 @@
|
|||
set storage_engine='tokudb';
|
||||
# Establish connection conn1 (user = root)
|
||||
drop table if exists s;
|
||||
create table s (a int auto_increment, b int, c int, primary key (a));
|
||||
# populate table s
|
||||
# done inserting elements
|
||||
set tokudb_create_index_online=1;
|
||||
create index i_a on s(c);
|
||||
set tokudb_write_lock_wait=1;
|
||||
set tokudb_read_lock_wait=1;
|
||||
# starting insert while create index is happening
|
||||
# done with insert
|
||||
select count(*) from s use index(primary);
|
||||
count(*)
|
||||
100000
|
||||
select count(*) from s use index(i_a);
|
||||
count(*)
|
||||
100000
|
||||
drop table s;
|
50
mysql-test/suite/tokudb.hotindex/t/hotindex-insert-2.test
Normal file
50
mysql-test/suite/tokudb.hotindex/t/hotindex-insert-2.test
Normal file
|
@ -0,0 +1,50 @@
|
|||
# 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 auto_increment, b int, c int, primary key (a));
|
||||
|
||||
--echo # populate table s
|
||||
--disable_query_log
|
||||
let $a = 10000;
|
||||
while ($a) {
|
||||
eval insert into s (b,c) values ($a,0),($a,1),($a,2),($a,3),($a,4),($a,5),($a,6),($a,7),($a,8),($a,9);
|
||||
dec $a;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
--echo # done inserting elements
|
||||
set tokudb_create_index_online=1;
|
||||
send create index i_a on s(c);
|
||||
|
||||
connection conn1;
|
||||
set tokudb_write_lock_wait=1;
|
||||
set tokudb_read_lock_wait=1;
|
||||
|
||||
--echo # starting insert while create index is happening
|
||||
--disable_query_log
|
||||
let $b=10000;
|
||||
while ($b) {
|
||||
eval replace into s values (1, 1000000000,$b);
|
||||
dec $b;
|
||||
}
|
||||
--enable_query_log
|
||||
--echo # done with insert
|
||||
|
||||
connection default;
|
||||
reap;
|
||||
select count(*) from s use index(primary);
|
||||
select count(*) from s use index(i_a);
|
||||
disconnect conn1;
|
||||
|
||||
#cleanup
|
||||
drop table s;
|
Loading…
Add table
Reference in a new issue