mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
[t:2908], add simple test
git-svn-id: file:///svn/mysql/tests/mysql-test@23838 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
a867561993
commit
0fda85370c
2 changed files with 103 additions and 0 deletions
53
mysql-test/suite/tokudb.mvcc/r/checksum-locks.result
Executable file
53
mysql-test/suite/tokudb.mvcc/r/checksum-locks.result
Executable file
|
@ -0,0 +1,53 @@
|
|||
SET STORAGE_ENGINE = 'tokudb';
|
||||
# Establish connection conn1 (user = root)
|
||||
DROP TABLE IF EXISTS foo;
|
||||
create table foo (a int)engine=TokuDB;
|
||||
show create table foo;
|
||||
Table Create Table
|
||||
foo CREATE TABLE `foo` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=TOKUDB DEFAULT CHARSET=latin1
|
||||
insert into foo values (1),(2),(3);
|
||||
begin;
|
||||
insert into foo values (4);
|
||||
set session transaction isolation level repeatable read;
|
||||
# 1,2,3
|
||||
select * from foo;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
checksum table foo;
|
||||
Table Checksum
|
||||
test.foo 251493421
|
||||
set session transaction isolation level read committed;
|
||||
# 1,2,3
|
||||
select * from foo;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
checksum table foo;
|
||||
Table Checksum
|
||||
test.foo 251493421
|
||||
set session transaction isolation level read uncommitted;
|
||||
# 1,2,3,4
|
||||
select * from foo;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
checksum table foo;
|
||||
Table Checksum
|
||||
test.foo 149057747
|
||||
set session transaction isolation level serializable;
|
||||
select * from foo;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
# should be NULl
|
||||
checksum table foo;
|
||||
Table Checksum
|
||||
test.foo NULL
|
||||
commit;
|
||||
set session transaction isolation level serializable;
|
||||
DROP TABLE foo;
|
50
mysql-test/suite/tokudb.mvcc/t/checksum-locks.test
Executable file
50
mysql-test/suite/tokudb.mvcc/t/checksum-locks.test
Executable file
|
@ -0,0 +1,50 @@
|
|||
# ticket 895 is a query optimization problem with the primary key
|
||||
|
||||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE = 'tokudb';
|
||||
|
||||
--echo # Establish connection conn1 (user = root)
|
||||
connect (conn1,localhost,root,,);
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS foo;
|
||||
--enable_warnings
|
||||
|
||||
connection default;
|
||||
create table foo (a int)engine=TokuDB;
|
||||
show create table foo;
|
||||
insert into foo values (1),(2),(3);
|
||||
begin;
|
||||
insert into foo values (4);
|
||||
|
||||
connection conn1;
|
||||
set session transaction isolation level repeatable read;
|
||||
--echo # 1,2,3
|
||||
select * from foo;
|
||||
checksum table foo;
|
||||
|
||||
set session transaction isolation level read committed;
|
||||
--echo # 1,2,3
|
||||
select * from foo;
|
||||
checksum table foo;
|
||||
|
||||
set session transaction isolation level read uncommitted;
|
||||
--echo # 1,2,3,4
|
||||
select * from foo;
|
||||
checksum table foo;
|
||||
|
||||
set session transaction isolation level serializable;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
select * from foo;
|
||||
--echo # should be NULl
|
||||
checksum table foo;
|
||||
|
||||
|
||||
connection default;
|
||||
commit;
|
||||
disconnect conn1;
|
||||
|
||||
connection default;
|
||||
# Final cleanup.
|
||||
set session transaction isolation level serializable;
|
||||
DROP TABLE foo;
|
Loading…
Reference in a new issue