summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb/t/fast_update_key.test
diff options
context:
space:
mode:
Diffstat (limited to 'storage/tokudb/mysql-test/tokudb/t/fast_update_key.test')
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/fast_update_key.test63
1 files changed, 35 insertions, 28 deletions
diff --git a/storage/tokudb/mysql-test/tokudb/t/fast_update_key.test b/storage/tokudb/mysql-test/tokudb/t/fast_update_key.test
index 21f3cbf999a..6ff74d191af 100644
--- a/storage/tokudb/mysql-test/tokudb/t/fast_update_key.test
+++ b/storage/tokudb/mysql-test/tokudb/t/fast_update_key.test
@@ -1,71 +1,78 @@
source include/have_tokudb.inc;
-set default_storage_engine='tokudb';
-
-disable_warnings;
-drop table if exists t;
-enable_warnings;
-
-set tokudb_disable_slow_update=1;
+set tokudb_enable_fast_update=1;
+source ../include/setup_fast_update_upsert.inc;
# must have primary key
-create table t (ida int not null, idb bigint not null, idc tinyint unsigned not null, x bigint);
+create table t (ida int not null,
+ idb bigint not null,
+ idc tinyint unsigned not null,
+ x bigint) engine = tokudb;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
-update noar t set x=x+1 where ida=1;
+update t set x=x+1 where ida=1;
drop table t;
# must have no clustering keys
-create table t (ida int not null, idb bigint not null, idc tinyint unsigned not null, x bigint, clustering key(ida,idb,idc));
+create table t (ida int not null,
+ idb bigint not null,
+ idc tinyint unsigned not null,
+ x bigint,
+ clustering key(ida,idb,idc)) engine = tokudb;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
-update noar t set x=x+1 where ida=1;
+update t set x=x+1 where ida=1;
drop table t;
-# update noar field must not be part of any key
-create table t (ida int not null, idb bigint not null, idc tinyint unsigned not null, x bigint, primary key(ida,idb,idc), key(x));
+# update field must not be part of any key
+create table t (ida int not null,
+ idb bigint not null,
+ idc tinyint unsigned not null,
+ x bigint,
+ primary key(ida,idb,idc),
+ key(x)) engine = tokudb;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
-update noar t set x=x+1 where ida=1;
+update t set x=x+1 where ida=1;
drop table t;
# must have no pk prefixed
-create table t (id char(32), x bigint, primary key(id(1)));
+create table t (id char(32), x bigint, primary key(id(1))) engine = tokudb;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
-update noar t set x=x+1 where id='hi';
+update t set x=x+1 where id='hi';
drop table t;
-create table t (id varchar(32), x bigint, primary key(id(1)));
+create table t (id varchar(32), x bigint, primary key(id(1))) engine = tokudb;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
-update noar t set x=x+1 where id='hi';
+update t set x=x+1 where id='hi';
drop table t;
# test for point updates on compound keys
-create table t (ida int not null, idb bigint not null, idc tinyint unsigned not null, x bigint, primary key(ida,idb,idc));
+create table t (ida int not null,
+ idb bigint not null,
+ idc tinyint unsigned not null,
+ x bigint,
+ primary key(ida,idb,idc)) engine = tokudb;
insert into t values (1,2,3,0);
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
-update noar t set x=x+1 where ida=1;
+update t set x=x+1 where ida=1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
-update noar t set x=x+1 where ida=1 and idb=2;
+update t set x=x+1 where ida=1 and idb=2;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
-update noar t set x=x+1 where ida=1 and idb=2 or idc=3;
+update t set x=x+1 where ida=1 and idb=2 or idc=3;
-update noar t set x=x+1 where ida=1 and idb=2 and idc=3;
+update t set x=x+1 where ida=1 and idb=2 and idc=3;
select * from t;
-update noar t set x=x+1 where idc=3 and ida=1 and idb=2;
+update t set x=x+1 where idc=3 and ida=1 and idb=2;
select * from t;
drop table t;
-
-
-
-