summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb/t/fast_upsert_values.test
blob: a0b7cf408a676f4f92f332a4da41e302c8d29b4f (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
# verify that values(x) works in update expression

source include/have_tokudb.inc;

source ../include/setup_fast_update_upsert.inc;
set tokudb_enable_fast_upsert=1;

create table t (id int primary key, x int not null) engine = tokudb;

insert into t values (1,1);
insert into t values (1,1) on duplicate key update x=x+1;
select * from t;

replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
insert into t values (1,10) on duplicate key update x=values(x)+1;
select * from t;

insert into t values (1,10) on duplicate key update x=x+values(x);
select * from t;

insert into t values (1,100) on duplicate key update x=x+values(x);
select * from t;

drop table t;