summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb/t/fast_upsert_key.test
blob: c11f2f49176fa3ac96363d0b8fe9adf1c02a1f33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
source include/have_tokudb.inc;

set default_storage_engine='tokudb';

disable_warnings;
drop table if exists t;
enable_warnings;

set tokudb_disable_slow_upsert=1;

# must have primary key
create table t (a int, b char(32), c varchar(32), d blob);
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
insert noar into t values (1,null,null,null) on duplicate key update a=42;
drop table t;

# must have no clustering keys
create table t (id int primary key, a int, b char(32), c varchar(32), d blob, clustering key(a));
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
insert noar into t values (1,null,null,null,null) on duplicate key update a=42;
drop table t;

# must have no secondary keys
create table t (id int primary key, a int, b char(32), c varchar(32), d blob, key(c));
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
insert noar into t values (1,null,null,null,null) on duplicate key update a=42;
drop table t;

# update field must not be part of any key
create table t (id int, a int, b char(32), c varchar(32), d blob, primary key(id, a));
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
insert noar into t values (1,2,null,null,null) on duplicate key update a=42;
drop table t;

create table t (id int, a int, b char(32), c varchar(32), d blob, primary key(a, id));
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
insert noar into t values (1,2,null,null,null) on duplicate key update a=42;
drop table t;