Commit fab39e22 authored by Rich Prohaska's avatar Rich Prohaska

#22 add a test for upsert values expr

parent e409e693
set default_storage_engine='tokudb';
drop table if exists t;
set tokudb_disable_slow_upsert=1;
create table t (id int primary key, x int not null);
insert noar into t values (1,42);
insert noar into t values (1,42) on duplicate key update x=x+1;
select * from t;
id x
1 43
insert noar into t values (1,42) on duplicate key update x=values(x)+1;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
select * from t;
id x
1 43
drop table t;
# verify that values(x) works in update expression
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;
create table t (id int primary key, x int not null);
insert noar into t values (1,42);
insert noar into t values (1,42) on duplicate key update x=x+1;
select * from t;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
insert noar into t values (1,42) on duplicate key update x=values(x)+1;
select * from t;
drop table t;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment