2011-09-08 03:06:53 +00:00
|
|
|
--source include/have_tokudb.inc
|
|
|
|
#
|
|
|
|
# Record inconsistency.
|
|
|
|
#
|
|
|
|
#
|
2012-10-03 22:35:02 +00:00
|
|
|
SET DEFAULT_STORAGE_ENGINE = 'tokudb';
|
2011-09-08 03:06:53 +00:00
|
|
|
|
|
|
|
--disable_warnings
|
|
|
|
DROP TABLE IF EXISTS foo;
|
|
|
|
--enable_warnings
|
|
|
|
set session tokudb_prelock_empty=off;
|
|
|
|
|
|
|
|
create table foo (a int, b bigint, primary key (a))engine=TokuDB;
|
|
|
|
insert into foo values (1,10),(2,20);
|
|
|
|
select * from foo;
|
2013-09-09 13:59:38 +02:00
|
|
|
alter table foo add index (b) clustering=yes;
|
2011-09-08 03:06:53 +00:00
|
|
|
insert into foo values (3,30);
|
|
|
|
select * from foo where b >=10;
|
|
|
|
drop table foo;
|
|
|
|
|
|
|
|
create table foo (a int, b bigint)engine=TokuDB;
|
|
|
|
insert into foo values (1,10),(2,20);
|
|
|
|
select * from foo;
|
2013-09-09 13:59:38 +02:00
|
|
|
alter table foo add index (b) clustering=yes;
|
2011-09-08 03:06:53 +00:00
|
|
|
insert into foo values (3,30);
|
|
|
|
select * from foo where b >=10;
|
|
|
|
drop table foo;
|
|
|
|
|
|
|
|
|
|
|
|
# just make sure nothing crashes
|
2013-09-09 13:59:38 +02:00
|
|
|
create table foo (a int, b longblob, key (a) clustering=yes);
|
2011-09-08 03:06:53 +00:00
|
|
|
insert into foo values (1,"aa");
|
|
|
|
insert into foo values (2,repeat('b', 100000));
|
|
|
|
insert into foo values (3,"bbb");
|
|
|
|
|
|
|
|
# Final cleanup.
|
|
|
|
DROP TABLE foo;
|
|
|
|
|