mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 03:21:53 +01:00
[t:2952], add some more tests
git-svn-id: file:///svn/mysql/tests/mysql-test@24948 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
62f11cf16a
commit
d6ae6f3cf3
4 changed files with 111 additions and 0 deletions
22
mysql-test/suite/tokudb.bugs/r/fileops-3.result
Executable file
22
mysql-test/suite/tokudb.bugs/r/fileops-3.result
Executable file
|
@ -0,0 +1,22 @@
|
|||
# Establish connection conn1 (user = root)
|
||||
SET STORAGE_ENGINE = 'tokudb';
|
||||
DROP TABLE IF EXISTS foo;
|
||||
create table foo ( a int, b int, c int, key (a), key (b));
|
||||
begin;
|
||||
select * from foo;
|
||||
a b c
|
||||
select sum(a) from foo;
|
||||
sum(a)
|
||||
NULL
|
||||
select * from foo;
|
||||
a b c
|
||||
drop table foo;
|
||||
ERROR 42S02: Unknown table 'foo'
|
||||
rename table foo to bar;
|
||||
ERROR HY000: Error on rename of './test/foo' to './test/bar' (errno: -30994)
|
||||
truncate table foo;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
alter table foo drop index a;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
commit;
|
||||
DROP TABLE foo;
|
19
mysql-test/suite/tokudb.bugs/r/fileops-4.result
Executable file
19
mysql-test/suite/tokudb.bugs/r/fileops-4.result
Executable file
|
@ -0,0 +1,19 @@
|
|||
# Establish connection conn1 (user = root)
|
||||
SET STORAGE_ENGINE = 'tokudb';
|
||||
DROP TABLE IF EXISTS foo;
|
||||
create table foo ( a int, b int, c int, key (a), key (b));
|
||||
insert into foo values (1,10,100);
|
||||
begin;
|
||||
insert into foo values (2,20,200);
|
||||
select * from foo;
|
||||
a b c
|
||||
1 10 100
|
||||
drop table foo;
|
||||
ERROR 42S02: Unknown table 'foo'
|
||||
rename table foo to bar;
|
||||
ERROR HY000: Error on rename of './test/foo' to './test/bar' (errno: -30994)
|
||||
truncate table foo;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
alter table foo drop index a;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
DROP TABLE foo;
|
37
mysql-test/suite/tokudb.bugs/t/fileops-3.test
Executable file
37
mysql-test/suite/tokudb.bugs/t/fileops-3.test
Executable file
|
@ -0,0 +1,37 @@
|
|||
# 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;
|
||||
--enable_warnings
|
||||
|
||||
connection conn1;
|
||||
create table foo ( a int, b int, c int, key (a), key (b));
|
||||
begin;
|
||||
select * from foo;
|
||||
select sum(a) from foo;
|
||||
|
||||
connection default;
|
||||
select * from foo;
|
||||
--error ER_BAD_TABLE_ERROR
|
||||
drop table foo;
|
||||
--error ER_ERROR_ON_RENAME
|
||||
rename table foo to bar;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
truncate table foo;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
alter table foo drop index a;
|
||||
|
||||
connection conn1;
|
||||
commit;
|
||||
|
||||
connection default;
|
||||
disconnect conn1;
|
||||
|
||||
connection default;
|
||||
# Final cleanup.
|
||||
DROP TABLE foo;
|
33
mysql-test/suite/tokudb.bugs/t/fileops-4.test
Executable file
33
mysql-test/suite/tokudb.bugs/t/fileops-4.test
Executable file
|
@ -0,0 +1,33 @@
|
|||
# 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;
|
||||
--enable_warnings
|
||||
|
||||
connection conn1;
|
||||
create table foo ( a int, b int, c int, key (a), key (b));
|
||||
insert into foo values (1,10,100);
|
||||
begin;
|
||||
insert into foo values (2,20,200);
|
||||
|
||||
connection default;
|
||||
select * from foo;
|
||||
--error ER_BAD_TABLE_ERROR
|
||||
drop table foo;
|
||||
--error ER_ERROR_ON_RENAME
|
||||
rename table foo to bar;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
truncate table foo;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
alter table foo drop index a;
|
||||
|
||||
disconnect conn1;
|
||||
|
||||
connection default;
|
||||
# Final cleanup.
|
||||
DROP TABLE foo;
|
Loading…
Add table
Reference in a new issue