mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
e776ba7701
git-svn-id: file:///svn/mysql/tests/mysql-test@55041 c7de825b-a66e-492c-adef-691d508d4ae1
43 lines
No EOL
1.1 KiB
Text
Executable file
43 lines
No EOL
1.1 KiB
Text
Executable file
# ticket 895 is a query optimization problem with the primary key
|
|
|
|
#--source include/have_tokudb.inc
|
|
--source include/not_5_5.inc
|
|
SET DEFAULT_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 repeatable read;
|
|
create table foo (a int, b int, c int, primary key (a))engine=TokuDB;
|
|
insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400);
|
|
begin;
|
|
--echo # should read all four values
|
|
select * from foo;
|
|
|
|
connection conn1;
|
|
set session transaction isolation level repeatable read;
|
|
set session tokudb_load_save_space=0;
|
|
alter table foo add index (b);
|
|
|
|
connection default;
|
|
--echo # should read all four values
|
|
select * from foo;
|
|
--echo # should fail
|
|
--error ER_TABLE_DEF_CHANGED
|
|
select sum(b) from foo;
|
|
commit;
|
|
--echo # should return 100
|
|
select sum(b) from foo;
|
|
|
|
connection default;
|
|
disconnect conn1;
|
|
|
|
connection default;
|
|
# Final cleanup.
|
|
set session transaction isolation level serializable;
|
|
DROP TABLE foo; |