mariadb/mysql-test/suite/tokudb.mvcc/t/2808-read-committed.test
Zardosht Kasheff c61464298f [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

54 lines
No EOL
1.2 KiB
Text
Executable file

# ticket 895 is a query optimization problem with the primary key
#--source include/have_tokudb.inc
--echo # Establish connection conn1 (user = root)
connect (conn1,localhost,root,,);
SET STORAGE_ENGINE = 'tokudb';
--disable_warnings
DROP TABLE IF EXISTS foo,foo_isam;
--enable_warnings
connection conn1;
set session transaction isolation level read committed;
create table foo ( a int, b int, primary key (a));
insert into foo values (1,1),(2,2),(3,1),(4,3);
select * from foo;
begin;
update foo set b=10 where b=1;
select * from foo;
connection default;
--error ER_LOCK_WAIT_TIMEOUT
insert into foo values (5,5);
connection conn1;
rollback;
select * from foo;
begin;
delete from foo where b=2;
select * from foo;
connection default;
--error ER_LOCK_WAIT_TIMEOUT
insert into foo values (5,5);
connection conn1;
rollback;
select * from foo;
create table foo_isam (a int, b int)engine=MyISAM;
begin;
insert into foo_isam select * from foo;
connection default;
--error ER_LOCK_WAIT_TIMEOUT
insert into foo values (5,5);
select * from foo;
connection default;
disconnect conn1;
connection default;
# Final cleanup.
set session transaction isolation level serializable;
DROP TABLE foo, foo_isam;