mariadb/mysql-test/suite/tokudb.mvcc/r/mvcc-32.result
Zardosht Kasheff 8ea4ac6085 [t:2922] move mvcc tests
git-svn-id: file:///svn/mysql/tests/mysql-test@23629 c7de825b-a66e-492c-adef-691d508d4ae1
2010-09-08 18:49:31 +00:00

21 lines
878 B
Text
Executable file

SET STORAGE_ENGINE = 'tokudb';
DROP TABLE IF EXISTS foo;
create table foo (a int, b int, primary key (a))engine=TokuDB;
insert into foo values (1,10),(2,20),(3,30),(4,40),(5,50),(6,60),(7,70),(8,80),(9,90);
insert into foo values (10,100),(20,200),(30,300),(40,400),(50,500),(60,600),(70,700),(80,800),(90,900);
# row estimate should be 6
explain select count(*) from foo where a > 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 6 Using where; Using index
select count(*) from foo where a > 30;
count(*)
6
delete from foo where a > 50;
# row estimate should be 2
explain select count(*) from foo where a > 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
select count(*) from foo where a > 30;
count(*)
2
DROP TABLE foo;