Commit d6ae6f3c authored by Zardosht Kasheff's avatar Zardosht Kasheff

[t:2952], add some more tests

git-svn-id: file:///svn/mysql/tests/mysql-test@24948 c7de825b-a66e-492c-adef-691d508d4ae1
parent 62f11cf1
# 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;
# 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;
# 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;
\ No newline at end of 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;
--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;
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment