Commit 8ba92e48 authored by Zardosht Kasheff's avatar Zardosht Kasheff

[t:4260], add simple sanity test

git-svn-id: file:///svn/mysql/tests/mysql-test@37746 c7de825b-a66e-492c-adef-691d508d4ae1
parent da74cfe0
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);
set session tokudb_disable_prefetching=ON;
select * from foo;
a b
1 10
2 20
3 30
4 40
5 50
select * from foo where a=1;
a b
1 10
select * from foo where a>1;
a b
2 20
3 30
4 40
5 50
begin;
select * from foo where a > 1 for update;
a b
2 20
3 30
4 40
5 50
commit;
set session transaction isolation level serializable;
select * from foo;
a b
1 10
2 20
3 30
4 40
5 50
select * from foo where a=1;
a b
1 10
select * from foo where a>1;
a b
2 20
3 30
4 40
5 50
begin;
select * from foo where a > 1 for update;
a b
2 20
3 30
4 40
5 50
commit;
DROP TABLE foo;
--source include/have_tokudb.inc
#
# Record inconsistency.
#
#
SET STORAGE_ENGINE = 'tokudb';
--disable_warnings
DROP TABLE IF EXISTS foo;
--enable_warnings
#do some sanity checks that queries with disable_prefetching ON work
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);
set session tokudb_disable_prefetching=ON;
select * from foo;
select * from foo where a=1;
select * from foo where a>1;
begin;
select * from foo where a > 1 for update;
commit;
set session transaction isolation level serializable;
select * from foo;
select * from foo where a=1;
select * from foo where a>1;
begin;
select * from foo where a > 1 for update;
commit;
# Final cleanup.
DROP TABLE foo;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment