mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
[t:4472], add test
git-svn-id: file:///svn/mysql/tests/mysql-test@39741 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
d7855969dd
commit
6526694dba
2 changed files with 95 additions and 0 deletions
38
mysql-test/suite/tokudb.bugs/r/4472.result
Normal file
38
mysql-test/suite/tokudb.bugs/r/4472.result
Normal file
|
@ -0,0 +1,38 @@
|
|||
SET STORAGE_ENGINE = 'tokudb';
|
||||
set session transaction isolation level repeatable read;
|
||||
# Establish connection conn1 (user = root)
|
||||
DROP TABLE IF EXISTS foo;
|
||||
set session transaction isolation level repeatable read;
|
||||
create table foo (a int) engine=TokuDB;
|
||||
insert into foo values (1);
|
||||
begin;
|
||||
select * from foo;
|
||||
a
|
||||
1
|
||||
alter table foo add column b int;
|
||||
alter table foo change b b bigint;
|
||||
truncate table foo;
|
||||
rename table foo to bar;
|
||||
drop table bar;
|
||||
select * From foo;
|
||||
ERROR 42S02: Table 'test.foo' doesn't exist
|
||||
set session transaction isolation level serializable;
|
||||
create table foo (a int) engine=TokuDB;
|
||||
insert into foo values (1);
|
||||
begin;
|
||||
insert into foo values(2);
|
||||
alter table foo add column b int;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
alter table foo change a a bigint;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
truncate table foo;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
rename table foo to bar;
|
||||
ERROR HY000: Error on rename of './test/foo' to './test/bar' (errno: -30994)
|
||||
drop table foo;
|
||||
ERROR 42S02: Unknown table 'foo'
|
||||
select * From foo;
|
||||
a
|
||||
1
|
||||
2
|
||||
drop table foo;
|
57
mysql-test/suite/tokudb.bugs/t/4472.test
Executable file
57
mysql-test/suite/tokudb.bugs/t/4472.test
Executable file
|
@ -0,0 +1,57 @@
|
|||
# test simple MVCC, that a transaction does not read something committed after it
|
||||
|
||||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE = 'tokudb';
|
||||
set session transaction isolation level repeatable read;
|
||||
|
||||
--echo # Establish connection conn1 (user = root)
|
||||
connect (conn1,localhost,root,,);
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS foo;
|
||||
--enable_warnings
|
||||
|
||||
connection conn1;
|
||||
set session transaction isolation level repeatable read;
|
||||
create table foo (a int) engine=TokuDB;
|
||||
insert into foo values (1);
|
||||
begin;
|
||||
select * from foo;
|
||||
|
||||
connection default;
|
||||
alter table foo add column b int;
|
||||
alter table foo change b b bigint;
|
||||
truncate table foo;
|
||||
rename table foo to bar;
|
||||
drop table bar;
|
||||
|
||||
connection conn1;
|
||||
--error ER_NO_SUCH_TABLE
|
||||
select * From foo;
|
||||
|
||||
connection conn1;
|
||||
set session transaction isolation level serializable;
|
||||
create table foo (a int) engine=TokuDB;
|
||||
insert into foo values (1);
|
||||
begin;
|
||||
insert into foo values(2);
|
||||
|
||||
connection default;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
alter table foo add column b int;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
alter table foo change a a bigint;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
truncate table foo;
|
||||
--error ER_ERROR_ON_RENAME
|
||||
rename table foo to bar;
|
||||
--error ER_BAD_TABLE_ERROR
|
||||
drop table foo;
|
||||
|
||||
connection conn1;
|
||||
select * From foo;
|
||||
|
||||
connection default;
|
||||
disconnect conn1;
|
||||
|
||||
drop table foo;
|
Loading…
Add table
Reference in a new issue