mirror of
https://github.com/MariaDB/server.git
synced 2025-03-11 17:48:36 +01:00
46 lines
1 KiB
Text
46 lines
1 KiB
Text
![]() |
# verify that serializable properly reads provisional delete and actual value
|
||
|
|
||
|
#--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;
|
||
|
set session transaction isolation level serializable;
|
||
|
create table foo (a int, b varchar(10), primary key (a))engine=TokuDB;
|
||
|
insert into foo values (1,"a");
|
||
|
|
||
|
connection conn1;
|
||
|
set session transaction isolation level repeatable read;
|
||
|
begin;
|
||
|
--echo # should read ONLY (1,"a")
|
||
|
select * from foo;
|
||
|
|
||
|
connection default;
|
||
|
delete from foo where a=1;
|
||
|
insert into foo values (2,"bb");
|
||
|
--echo # should read ONLY (2,"bb")
|
||
|
begin;
|
||
|
select * from foo;
|
||
|
|
||
|
connection conn1;
|
||
|
--echo # should read ONLY (1,"a")
|
||
|
select * From foo;
|
||
|
commit;
|
||
|
--error ER_LOCK_WAIT_TIMEOUT
|
||
|
insert into foo values ("101000","asdf");
|
||
|
|
||
|
connection default;
|
||
|
commit;
|
||
|
disconnect conn1;
|
||
|
|
||
|
connection default;
|
||
|
# Final cleanup.
|
||
|
set session transaction isolation level serializable;
|
||
|
DROP TABLE foo;
|