Commit e02b8847 authored by Rich Prohaska's avatar Rich Prohaska

refs #5826 test NOAR for fast updates

git-svn-id: file:///svn/mysql/tests/mysql-test@51714 c7de825b-a66e-492c-adef-691d508d4ae1
parent 634a08c5
...@@ -2,15 +2,15 @@ set default_storage_engine='tokudb'; ...@@ -2,15 +2,15 @@ set default_storage_engine='tokudb';
create table tt (id int primary key, x int); create table tt (id int primary key, x int);
set session tokudb_enable_fast_upsert=1; set session tokudb_enable_fast_upsert=1;
set session tokudb_disable_slow_upsert=1; set session tokudb_disable_slow_upsert=1;
insert into tt values (1,0); insert noar into tt values (1,0);
insert into tt values (1,0) on duplicate key update x=x+1; insert noar into tt values (1,0) on duplicate key update x=x+1;
ERROR 42000: Table 'tt' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 'tt' uses an extension that doesn't exist in this XYZ version
insert into tt values (2,0) on duplicate key update x=x+1; insert noar into tt values (2,0) on duplicate key update x=x+1;
ERROR 42000: Table 'tt' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 'tt' uses an extension that doesn't exist in this XYZ version
set session tokudb_enable_fast_update=1; set session tokudb_enable_fast_update=1;
set session tokudb_disable_slow_update=1; set session tokudb_disable_slow_update=1;
update tt set x=x+1 where id=1; update noar tt set x=x+1 where id=1;
ERROR 42000: Table 'tt' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 'tt' uses an extension that doesn't exist in this XYZ version
update tt set x=x+1 where id=2; update noar tt set x=x+1 where id=2;
ERROR 42000: Table 'tt' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 'tt' uses an extension that doesn't exist in this XYZ version
drop table tt; drop table tt;
...@@ -3,6 +3,6 @@ drop table if exists t; ...@@ -3,6 +3,6 @@ drop table if exists t;
create table t (id int primary key, b int, key(b)); create table t (id int primary key, b int, key(b));
set tokudb_enable_fast_update=1; set tokudb_enable_fast_update=1;
set tokudb_disable_slow_update=1; set tokudb_disable_slow_update=1;
update t set b=b+1 where id=42; update noar t set b=b+1 where id=42;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t; drop table t;
...@@ -7,11 +7,11 @@ create table ti like tt; ...@@ -7,11 +7,11 @@ create table ti like tt;
alter table ti engine=innodb; alter table ti engine=innodb;
insert into tt values (1,null,null); insert into tt values (1,null,null);
insert into ti values (1,null,null); insert into ti values (1,null,null);
update tt set c='hi' where id=1; update noar tt set c='hi' where id=1;
update ti set c='hi' where id=1; update noar ti set c='hi' where id=1;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set c='there' where id=1; update noar tt set c='there' where id=1;
update ti set c='there' where id=1; update noar ti set c='there' where id=1;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
drop table tt, ti; drop table tt, ti;
create table tt (id char(8) primary key, c char(32), b binary(32)); create table tt (id char(8) primary key, c char(32), b binary(32));
...@@ -19,11 +19,11 @@ create table ti like tt; ...@@ -19,11 +19,11 @@ create table ti like tt;
alter table ti engine=innodb; alter table ti engine=innodb;
insert into tt values ('1',null,null); insert into tt values ('1',null,null);
insert into ti values ('1',null,null); insert into ti values ('1',null,null);
update tt set c='hi' where id='1'; update noar tt set c='hi' where id='1';
update ti set c='hi' where id='1'; update noar ti set c='hi' where id='1';
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set c='there' where id='1'; update noar tt set c='there' where id='1';
update ti set c='there' where id='1'; update noar ti set c='there' where id='1';
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
drop table tt, ti; drop table tt, ti;
create table tt (id varchar(8) primary key, a int, b char(32), c char(32), d binary(32)); create table tt (id varchar(8) primary key, a int, b char(32), c char(32), d binary(32));
...@@ -31,11 +31,11 @@ create table ti like tt; ...@@ -31,11 +31,11 @@ create table ti like tt;
alter table ti engine=innodb; alter table ti engine=innodb;
insert into tt values ('1',null,null,null,null); insert into tt values ('1',null,null,null,null);
insert into ti values ('1',null,null,null,null); insert into ti values ('1',null,null,null,null);
update tt set b='hi' where id='1'; update noar tt set b='hi' where id='1';
update ti set b='hi' where id='1'; update noar ti set b='hi' where id='1';
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set c='there' where id='1'; update noar tt set c='there' where id='1';
update ti set c='there' where id='1'; update noar ti set c='there' where id='1';
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
drop table tt, ti; drop table tt, ti;
create table tt (id varchar(8) primary key, a int, b char(32), c char(32), d binary(32)); create table tt (id varchar(8) primary key, a int, b char(32), c char(32), d binary(32));
...@@ -43,13 +43,13 @@ create table ti like tt; ...@@ -43,13 +43,13 @@ create table ti like tt;
alter table ti engine=innodb; alter table ti engine=innodb;
insert into tt values ('1',null,null,null,null); insert into tt values ('1',null,null,null,null);
insert into ti values ('1',null,null,null,null); insert into ti values ('1',null,null,null,null);
update tt set b='123' where id='1'; update noar tt set b='123' where id='1';
update ti set b='123' where id='1'; update noar ti set b='123' where id='1';
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set c=456 where id='1'; update noar tt set c=456 where id='1';
update ti set c=456 where id='1'; update noar ti set c=456 where id='1';
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set c=789 where id=1; update noar tt set c=789 where id=1;
update ti set c=789 where id=1; update noar ti set c=789 where id=1;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
drop table tt, ti; drop table tt, ti;
...@@ -3,8 +3,8 @@ drop table if exists tt; ...@@ -3,8 +3,8 @@ drop table if exists tt;
set tokudb_enable_fast_update=1; set tokudb_enable_fast_update=1;
set tokudb_disable_slow_update=1; set tokudb_disable_slow_update=1;
create table tt (id int primary key, x int); create table tt (id int primary key, x int);
update tt set x=1 where id='abc'; update noar tt set x=1 where id='abc';
ERROR 42000: Table 'tt' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 'tt' uses an extension that doesn't exist in this XYZ version
update tt set x='abc' where id=1; update noar tt set x='abc' where id=1;
ERROR 42000: Table 'tt' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 'tt' uses an extension that doesn't exist in this XYZ version
drop table tt; drop table tt;
...@@ -7,56 +7,56 @@ alter table ti engine=innodb; ...@@ -7,56 +7,56 @@ alter table ti engine=innodb;
insert into ti select * from tt; insert into ti select * from tt;
set tokudb_enable_fast_update=1; set tokudb_enable_fast_update=1;
set tokudb_disable_slow_update=1; set tokudb_disable_slow_update=1;
update tt set x=x+1 where id=1; update noar tt set x=x+1 where id=1;
update ti set x=x+1 where id=1; update noar ti set x=x+1 where id=1;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set x=x-2 where id=1; update noar tt set x=x-2 where id=1;
update ti set x=x-2 where id=1; update noar ti set x=x-2 where id=1;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set x=x+1 where id=1; update noar tt set x=x+1 where id=1;
update ti set x=x+1 where id=1; update noar ti set x=x+1 where id=1;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set x=x-1 where id=2; update noar tt set x=x-1 where id=2;
update ti set x=x-1 where id=2; update noar ti set x=x-1 where id=2;
Warnings: Warnings:
Warning 1264 Out of range value for column 'x' at row 1 Warning 1264 Out of range value for column 'x' at row 1
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set x=x+1 where id=2; update noar tt set x=x+1 where id=2;
update ti set x=x+1 where id=2; update noar ti set x=x+1 where id=2;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set x=x+1 where id=3; update noar tt set x=x+1 where id=3;
update ti set x=x+1 where id=3; update noar ti set x=x+1 where id=3;
Warnings: Warnings:
Warning 1264 Out of range value for column 'x' at row 1 Warning 1264 Out of range value for column 'x' at row 1
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set x=x-1 where id=3; update noar tt set x=x-1 where id=3;
update ti set x=x-1 where id=3; update noar ti set x=x-1 where id=3;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
insert into tt values (4,pow(2,31)-10); insert into tt values (4,pow(2,31)-10);
insert into ti values (4,pow(2,31)-10); insert into ti values (4,pow(2,31)-10);
update tt set x=x+20 where id=4; update noar tt set x=x+20 where id=4;
update ti set x=x+20 where id=4; update noar ti set x=x+20 where id=4;
Warnings: Warnings:
Warning 1264 Out of range value for column 'x' at row 1 Warning 1264 Out of range value for column 'x' at row 1
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
insert into tt values (5,pow(2,31)-10); insert into tt values (5,pow(2,31)-10);
insert into ti values (5,pow(2,31)-10); insert into ti values (5,pow(2,31)-10);
update tt set x=x - -20 where id=5; update noar tt set x=x - -20 where id=5;
update ti set x=x - -20 where id=5; update noar ti set x=x - -20 where id=5;
Warnings: Warnings:
Warning 1264 Out of range value for column 'x' at row 1 Warning 1264 Out of range value for column 'x' at row 1
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
insert into tt values (6,-pow(2,31)+10); insert into tt values (6,-pow(2,31)+10);
insert into ti values (6,-pow(2,31)+10); insert into ti values (6,-pow(2,31)+10);
update tt set x=x-20 where id=6; update noar tt set x=x-20 where id=6;
update ti set x=x-20 where id=6; update noar ti set x=x-20 where id=6;
Warnings: Warnings:
Warning 1264 Out of range value for column 'x' at row 1 Warning 1264 Out of range value for column 'x' at row 1
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
insert into tt values (7,-pow(2,31)+10); insert into tt values (7,-pow(2,31)+10);
insert into ti values (7,-pow(2,31)+10); insert into ti values (7,-pow(2,31)+10);
update tt set x=x + -20 where id=7; update noar tt set x=x + -20 where id=7;
update ti set x=x + -20 where id=7; update noar ti set x=x + -20 where id=7;
Warnings: Warnings:
Warning 1264 Out of range value for column 'x' at row 1 Warning 1264 Out of range value for column 'x' at row 1
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
......
...@@ -4,15 +4,15 @@ set tokudb_enable_fast_update=1; ...@@ -4,15 +4,15 @@ set tokudb_enable_fast_update=1;
set tokudb_disable_slow_update=1; set tokudb_disable_slow_update=1;
create table t (id int primary key, x int not null); create table t (id int primary key, x int not null);
insert into t values (1,0); insert into t values (1,0);
update t set x=42 where id=1; update noar t set x=42 where id=1;
update t set x=x+1 where id=1; update noar t set x=x+1 where id=1;
update t set x=x-1 where id=1; update noar t set x=x-1 where id=1;
set session sql_mode="NO_ENGINE_SUBSTITUTION,traditional"; set session sql_mode="NO_ENGINE_SUBSTITUTION,traditional";
update t set x=42 where id=1; update noar t set x=42 where id=1;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
update t set x=x+1 where id=1; update noar t set x=x+1 where id=1;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
update t set x=x-1 where id=1; update noar t set x=x-1 where id=1;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
set session sql_mode="NO_ENGINE_SUBSTITUTION"; set session sql_mode="NO_ENGINE_SUBSTITUTION";
drop table t; drop table t;
...@@ -7,31 +7,31 @@ alter table ti engine=innodb; ...@@ -7,31 +7,31 @@ alter table ti engine=innodb;
insert into ti select * from tt; insert into ti select * from tt;
set tokudb_enable_fast_update=1; set tokudb_enable_fast_update=1;
set tokudb_disable_slow_update=1; set tokudb_disable_slow_update=1;
update tt set x=x+1 where id=1; update noar tt set x=x+1 where id=1;
update ti set x=x+1 where id=1; update noar ti set x=x+1 where id=1;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set x=x-2 where id=1; update noar tt set x=x-2 where id=1;
update ti set x=if(x<2,0,x-2) where id=1; update noar ti set x=if(x<2,0,x-2) where id=1;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set x=x+1 where id=1; update noar tt set x=x+1 where id=1;
update ti set x=x+1 where id=1; update noar ti set x=x+1 where id=1;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set x=x-1 where id=2; update noar tt set x=x-1 where id=2;
update ti set x=x-1 where id=2; update noar ti set x=x-1 where id=2;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
update tt set x=x+1 where id=2; update noar tt set x=x+1 where id=2;
update ti set x=x+1 where id=2; update noar ti set x=x+1 where id=2;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
insert into tt values (4,pow(2,32)-10); insert into tt values (4,pow(2,32)-10);
insert into ti values (4,pow(2,32)-10); insert into ti values (4,pow(2,32)-10);
update tt set x=x+20 where id=4; update noar tt set x=x+20 where id=4;
update ti set x=x+20 where id=4; update noar ti set x=x+20 where id=4;
Warnings: Warnings:
Warning 1264 Out of range value for column 'x' at row 1 Warning 1264 Out of range value for column 'x' at row 1
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
insert into tt values (5,10); insert into tt values (5,10);
insert into ti values (5,10); insert into ti values (5,10);
update tt set x=x-20 where id=5; update noar tt set x=x-20 where id=5;
update ti set x=if(x<20,0,x-20) where id=5; update noar ti set x=if(x<20,0,x-20) where id=5;
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
drop table tt, ti; drop table tt, ti;
...@@ -4,13 +4,13 @@ create table t (id bigint primary key, b bigint not null default 0); ...@@ -4,13 +4,13 @@ create table t (id bigint primary key, b bigint not null default 0);
insert into t (id) values (1),(2); insert into t (id) values (1),(2);
set session tokudb_enable_fast_update=1; set session tokudb_enable_fast_update=1;
begin; begin;
update t set b=b+1 where id=1; update noar t set b=b+1 where id=1;
set session tokudb_enable_fast_update=1; set session tokudb_enable_fast_update=1;
begin; begin;
update t set b=b-1 where id=2; update noar t set b=b-1 where id=2;
update t set b=b+1 where id=2; update noar t set b=b+1 where id=2;
update t set b=b-1 where id=1; update noar t set b=b-1 where id=1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction Got one of the listed errors
rollback; rollback;
commit; commit;
select * from t; select * from t;
......
...@@ -3,38 +3,38 @@ drop table if exists t; ...@@ -3,38 +3,38 @@ drop table if exists t;
set tokudb_enable_fast_update=1; set tokudb_enable_fast_update=1;
set tokudb_disable_slow_update=1; set tokudb_disable_slow_update=1;
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);
update t set x=x+1 where ida=1; update noar t set x=x+1 where ida=1;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t; drop table t;
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));
update t set x=x+1 where ida=1; update noar t set x=x+1 where ida=1;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t; drop table t;
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)); 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 t set x=x+1 where ida=1; update noar t set x=x+1 where ida=1;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t; drop table t;
create table t (id char(32), x bigint, primary key(id(1))); create table t (id char(32), x bigint, primary key(id(1)));
update t set x=x+1 where id='hi'; update noar t set x=x+1 where id='hi';
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t; 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)));
update t set x=x+1 where id='hi'; update noar t set x=x+1 where id='hi';
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t; drop table t;
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));
insert into t values (1,2,3,0); insert into t values (1,2,3,0);
update t set x=x+1 where ida=1; update noar t set x=x+1 where ida=1;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
update t set x=x+1 where ida=1 and idb=2; update noar t set x=x+1 where ida=1 and idb=2;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
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 or idc=3;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
update t set x=x+1 where ida=1 and idb=2 and idc=3; update noar t set x=x+1 where ida=1 and idb=2 and idc=3;
select * from t; select * from t;
ida idb idc x ida idb idc x
1 2 3 1 1 2 3 1
update t set x=x+1 where idc=3 and ida=1 and idb=2; update noar t set x=x+1 where idc=3 and ida=1 and idb=2;
select * from t; select * from t;
ida idb idc x ida idb idc x
1 2 3 2 1 2 3 2
......
...@@ -5,16 +5,16 @@ set tokudb_disable_slow_upsert=1; ...@@ -5,16 +5,16 @@ set tokudb_disable_slow_upsert=1;
create table tt (id int primary key, c char(32), b binary(32)); create table tt (id int primary key, c char(32), b binary(32));
create table ti like tt; create table ti like tt;
alter table ti engine=innodb; alter table ti engine=innodb;
insert into tt values (1,null,null) on duplicate key update c='hi'; insert noar into tt values (1,null,null) on duplicate key update c='hi';
insert into ti values (1,null,null) on duplicate key update c='hi'; insert noar into ti values (1,null,null) on duplicate key update c='hi';
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
insert into tt values (1,null,null) on duplicate key update c='there'; insert noar into tt values (1,null,null) on duplicate key update c='there';
insert into ti values (1,null,null) on duplicate key update c='there'; insert noar into ti values (1,null,null) on duplicate key update c='there';
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
insert into tt values (1,null,null) on duplicate key update b='you'; insert noar into tt values (1,null,null) on duplicate key update b='you';
insert into ti values (1,null,null) on duplicate key update b='you'; insert noar into ti values (1,null,null) on duplicate key update b='you';
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
insert into tt values (1,null,null) on duplicate key update b='people'; insert noar into tt values (1,null,null) on duplicate key update b='people';
insert into ti values (1,null,null) on duplicate key update b='people'; insert noar into ti values (1,null,null) on duplicate key update b='people';
include/diff_tables.inc [test.tt, test.ti] include/diff_tables.inc [test.tt, test.ti]
drop table tt, ti; drop table tt, ti;
...@@ -3,13 +3,13 @@ set default_storage_engine='tokudb'; ...@@ -3,13 +3,13 @@ set default_storage_engine='tokudb';
create table t (id bigint primary key, b bigint not null default 0); create table t (id bigint primary key, b bigint not null default 0);
set session tokudb_enable_fast_upsert=1; set session tokudb_enable_fast_upsert=1;
begin; begin;
insert into t (id) values (1) on duplicate key update b=b+1; insert noar into t (id) values (1) on duplicate key update b=b+1;
set session tokudb_enable_fast_upsert=1; set session tokudb_enable_fast_upsert=1;
begin; begin;
insert into t (id) values (2) on duplicate key update b=b-1; insert noar into t (id) values (2) on duplicate key update b=b-1;
insert into t (id) values (2) on duplicate key update b=b+1; insert noar into t (id) values (2) on duplicate key update b=b+1;
insert into t (id) values (1) on duplicate key update b=b-1; insert noar into t (id) values (1) on duplicate key update b=b-1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction Got one of the listed errors
rollback; rollback;
commit; commit;
select * from t; select * from t;
......
...@@ -3,22 +3,22 @@ drop table if exists t; ...@@ -3,22 +3,22 @@ drop table if exists t;
set tokudb_enable_fast_upsert=1; set tokudb_enable_fast_upsert=1;
set tokudb_disable_slow_upsert=1; set tokudb_disable_slow_upsert=1;
create table t (a int, b char(32), c varchar(32), d blob); create table t (a int, b char(32), c varchar(32), d blob);
insert into t values (1,null,null,null) on duplicate key update a=42; insert noar into t values (1,null,null,null) on duplicate key update a=42;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t; drop table t;
create table t (id int primary key, a int, b char(32), c varchar(32), d blob, clustering key(a)); create table t (id int primary key, a int, b char(32), c varchar(32), d blob, clustering key(a));
insert into t values (1,null,null,null,null) on duplicate key update a=42; insert noar into t values (1,null,null,null,null) on duplicate key update a=42;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t; drop table t;
create table t (id int primary key, a int, b char(32), c varchar(32), d blob, key(c)); create table t (id int primary key, a int, b char(32), c varchar(32), d blob, key(c));
insert into t values (1,null,null,null,null) on duplicate key update a=42; insert noar into t values (1,null,null,null,null) on duplicate key update a=42;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t; drop table t;
create table t (id int, a int, b char(32), c varchar(32), d blob, primary key(id, a)); create table t (id int, a int, b char(32), c varchar(32), d blob, primary key(id, a));
insert into t values (1,2,null,null,null) on duplicate key update a=42; insert noar into t values (1,2,null,null,null) on duplicate key update a=42;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t; drop table t;
create table t (id int, a int, b char(32), c varchar(32), d blob, primary key(a, id)); create table t (id int, a int, b char(32), c varchar(32), d blob, primary key(a, id));
insert into t values (1,2,null,null,null) on duplicate key update a=42; insert noar into t values (1,2,null,null,null) on duplicate key update a=42;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t; drop table t;
...@@ -3,16 +3,16 @@ drop table if exists t; ...@@ -3,16 +3,16 @@ drop table if exists t;
set tokudb_enable_fast_upsert=1; set tokudb_enable_fast_upsert=1;
set tokudb_disable_slow_upsert=1; set tokudb_disable_slow_upsert=1;
create table t (id int primary key, x int not null); create table t (id int primary key, x int not null);
insert into t values (1,0); insert noar into t values (1,0);
insert into t values (1,0) on duplicate key update x=42; insert noar into t values (1,0) on duplicate key update x=42;
insert into t values (1,0) on duplicate key update x=x+1; insert noar into t values (1,0) on duplicate key update x=x+1;
insert into t values (1,0) on duplicate key update x=x-1; insert noar into t values (1,0) on duplicate key update x=x-1;
set session sql_mode="NO_ENGINE_SUBSTITUTION,traditional"; set session sql_mode="NO_ENGINE_SUBSTITUTION,traditional";
insert into t values (1,0) on duplicate key update x=42; insert noar into t values (1,0) on duplicate key update x=42;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
insert into t values (1,0) on duplicate key update x=x+1; insert noar into t values (1,0) on duplicate key update x=x+1;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
insert into t values (1,0) on duplicate key update x=x-1; insert noar into t values (1,0) on duplicate key update x=x-1;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
set session sql_mode="NO_ENGINE_SUBSTITUTION"; set session sql_mode="NO_ENGINE_SUBSTITUTION";
drop table t; drop table t;
...@@ -7,25 +7,25 @@ create table tt (id int primary key, x int); ...@@ -7,25 +7,25 @@ create table tt (id int primary key, x int);
set session tokudb_enable_fast_upsert=1; set session tokudb_enable_fast_upsert=1;
set session tokudb_disable_slow_upsert=1; set session tokudb_disable_slow_upsert=1;
insert into tt values (1,0); insert noar into tt values (1,0);
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into tt values (1,0) on duplicate key update x=x+1; insert noar into tt values (1,0) on duplicate key update x=x+1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into tt values (2,0) on duplicate key update x=x+1; insert noar into tt values (2,0) on duplicate key update noaf x=x+1;
set session tokudb_enable_fast_update=1; set session tokudb_enable_fast_update=1;
set session tokudb_disable_slow_update=1; set session tokudb_disable_slow_update=1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update tt set x=x+1 where id=1; update noar tt set x=x+1 where id=1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update tt set x=x+1 where id=2; update noar tt set x=x+1 where id=2;
drop table tt; drop table tt;
...@@ -7,25 +7,25 @@ create table tt (id int primary key, x int); ...@@ -7,25 +7,25 @@ create table tt (id int primary key, x int);
set session tokudb_enable_fast_upsert=1; set session tokudb_enable_fast_upsert=1;
set session tokudb_disable_slow_upsert=1; set session tokudb_disable_slow_upsert=1;
insert into tt values (1,0); insert noar into tt values (1,0);
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into tt values (1,0) on duplicate key update x=x+1; insert noar into tt values (1,0) on duplicate key update noaf x=x+1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into tt values (2,0) on duplicate key update x=x+1; insert noar into tt values (2,0) on duplicate key update noaf x=x+1;
set session tokudb_enable_fast_update=1; set session tokudb_enable_fast_update=1;
set session tokudb_disable_slow_update=1; set session tokudb_disable_slow_update=1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update tt set x=x+1 where id=1; update noar tt set x=x+1 where id=1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update tt set x=x+1 where id=2; update noar tt set x=x+1 where id=2;
drop table tt; drop table tt;
...@@ -7,25 +7,25 @@ create table tt (id int primary key, x int); ...@@ -7,25 +7,25 @@ create table tt (id int primary key, x int);
set session tokudb_enable_fast_upsert=1; set session tokudb_enable_fast_upsert=1;
set session tokudb_disable_slow_upsert=1; set session tokudb_disable_slow_upsert=1;
insert into tt values (1,0); insert noar into tt values (1,0);
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into tt values (1,0) on duplicate key update x=x+1; insert noar into tt values (1,0) on duplicate key update x=x+1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into tt values (2,0) on duplicate key update x=x+1; insert noar into tt values (2,0) on duplicate key update x=x+1;
set session tokudb_enable_fast_update=1; set session tokudb_enable_fast_update=1;
set session tokudb_disable_slow_update=1; set session tokudb_disable_slow_update=1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update tt set x=x+1 where id=1; update noar tt set x=x+1 where id=1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update tt set x=x+1 where id=2; update noar tt set x=x+1 where id=2;
drop table tt; drop table tt;
...@@ -13,6 +13,6 @@ set tokudb_disable_slow_update=1; ...@@ -13,6 +13,6 @@ set tokudb_disable_slow_update=1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
--error ER_UNSUPPORTED_EXTENSION --error ER_UNSUPPORTED_EXTENSION
update t set b=b+1 where id=42; update noar t set b=b+1 where id=42;
drop table t; drop table t;
...@@ -20,13 +20,13 @@ alter table ti engine=innodb; ...@@ -20,13 +20,13 @@ alter table ti engine=innodb;
insert into tt values (1,null,null); insert into tt values (1,null,null);
insert into ti values (1,null,null); insert into ti values (1,null,null);
update tt set c='hi' where id=1; update noar tt set c='hi' where id=1;
update ti set c='hi' where id=1; update noar ti set c='hi' where id=1;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set c='there' where id=1; update noar tt set c='there' where id=1;
update ti set c='there' where id=1; update noar ti set c='there' where id=1;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
...@@ -39,13 +39,13 @@ alter table ti engine=innodb; ...@@ -39,13 +39,13 @@ alter table ti engine=innodb;
insert into tt values ('1',null,null); insert into tt values ('1',null,null);
insert into ti values ('1',null,null); insert into ti values ('1',null,null);
update tt set c='hi' where id='1'; update noar tt set c='hi' where id='1';
update ti set c='hi' where id='1'; update noar ti set c='hi' where id='1';
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set c='there' where id='1'; update noar tt set c='there' where id='1';
update ti set c='there' where id='1'; update noar ti set c='there' where id='1';
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
...@@ -58,13 +58,13 @@ alter table ti engine=innodb; ...@@ -58,13 +58,13 @@ alter table ti engine=innodb;
insert into tt values ('1',null,null,null,null); insert into tt values ('1',null,null,null,null);
insert into ti values ('1',null,null,null,null); insert into ti values ('1',null,null,null,null);
update tt set b='hi' where id='1'; update noar tt set b='hi' where id='1';
update ti set b='hi' where id='1'; update noar ti set b='hi' where id='1';
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set c='there' where id='1'; update noar tt set c='there' where id='1';
update ti set c='there' where id='1'; update noar ti set c='there' where id='1';
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
...@@ -77,18 +77,18 @@ alter table ti engine=innodb; ...@@ -77,18 +77,18 @@ alter table ti engine=innodb;
insert into tt values ('1',null,null,null,null); insert into tt values ('1',null,null,null,null);
insert into ti values ('1',null,null,null,null); insert into ti values ('1',null,null,null,null);
update tt set b='123' where id='1'; update noar tt set b='123' where id='1';
update ti set b='123' where id='1'; update noar ti set b='123' where id='1';
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set c=456 where id='1'; update noar tt set c=456 where id='1';
update ti set c=456 where id='1'; update noar ti set c=456 where id='1';
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set c=789 where id=1; update noar tt set c=789 where id=1;
update ti set c=789 where id=1; update noar ti set c=789 where id=1;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
......
...@@ -16,11 +16,11 @@ create table tt (id int primary key, x int); ...@@ -16,11 +16,11 @@ create table tt (id int primary key, x int);
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update tt set x=1 where id='abc'; update noar tt set x=1 where id='abc';
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update tt set x='abc' where id=1; update noar tt set x='abc' where id=1;
drop table tt; drop table tt;
......
...@@ -30,48 +30,48 @@ def test_int(t, u, n): ...@@ -30,48 +30,48 @@ def test_int(t, u, n):
print "set tokudb_disable_slow_update=1;" print "set tokudb_disable_slow_update=1;"
# set is fast # set is fast
print "update t set x=100 where id=2;" print "update noar t set x=100 where id=2;"
print "select * from t;" print "select * from t;"
# increment is fast # increment is fast
print "update t set x=x+1 where id=3;" print "update noar t set x=x+1 where id=3;"
print "select * from t;" print "select * from t;"
# decrement is fast # decrement is fast
print "update t set x=x-1 where id=3;" print "update noar t set x=x-1 where id=3;"
print "select * from t;" print "select * from t;"
# field=field+constant is fast # field=field+constant is fast
print "update t set x=x+100 where id=3;" print "update noar t set x=x+100 where id=3;"
print "select * from t;" print "select * from t;"
# field=field-constant is fast # field=field-constant is fast
print "update t set x=x-100 where id=3;" print "update noar t set x=x-100 where id=3;"
print "select * from t;" print "select * from t;"
# field=constant+field is not yet fast # field=constant+field is not yet fast
print "replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;" print "replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;"
print "error ER_UNSUPPORTED_EXTENSION;" print "error ER_UNSUPPORTED_EXTENSION;"
print "update t set x=1+x where id=1;" print "update noar t set x=1+x where id=1;"
# field=-field is not yet fast # field=-field is not yet fast
print "replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;" print "replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;"
print "error ER_UNSUPPORTED_EXTENSION;" print "error ER_UNSUPPORTED_EXTENSION;"
print "update t set x=-x where id=1;" print "update noar t set x=-x where id=1;"
# yes, we can update a field in a non-existent row and the row is not inserted # yes, we can update a field in a non-existent row and the row is not inserted
print "update t set x=x+1 where id=100;" print "update noar t set x=x+1 where id=100;"
print "select * from t;" print "select * from t;"
# range updates are not yet fast # range updates are not yet fast
print "replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;" print "replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;"
print "error ER_UNSUPPORTED_EXTENSION;" print "error ER_UNSUPPORTED_EXTENSION;"
print "update t set x=x+1 where 1 <= id and id < 100;" print "update noar t set x=x+1 where 1 <= id and id < 100;"
# full table updates are not yet fast # full table updates are not yet fast
print "replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;" print "replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;"
print "error ER_UNSUPPORTED_EXTENSION;" print "error ER_UNSUPPORTED_EXTENSION;"
print "update t set x=x+1;" print "update noar t set x=x+1;"
print "drop table t;" print "drop table t;"
......
...@@ -16,68 +16,68 @@ insert into ti select * from tt; ...@@ -16,68 +16,68 @@ insert into ti select * from tt;
set tokudb_enable_fast_update=1; set tokudb_enable_fast_update=1;
set tokudb_disable_slow_update=1; set tokudb_disable_slow_update=1;
update tt set x=x+1 where id=1; update noar tt set x=x+1 where id=1;
update ti set x=x+1 where id=1; update noar ti set x=x+1 where id=1;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set x=x-2 where id=1; update noar tt set x=x-2 where id=1;
update ti set x=x-2 where id=1; update noar ti set x=x-2 where id=1;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set x=x+1 where id=1; update noar tt set x=x+1 where id=1;
update ti set x=x+1 where id=1; update noar ti set x=x+1 where id=1;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set x=x-1 where id=2; update noar tt set x=x-1 where id=2;
update ti set x=x-1 where id=2; update noar ti set x=x-1 where id=2;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set x=x+1 where id=2; update noar tt set x=x+1 where id=2;
update ti set x=x+1 where id=2; update noar ti set x=x+1 where id=2;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set x=x+1 where id=3; update noar tt set x=x+1 where id=3;
update ti set x=x+1 where id=3; update noar ti set x=x+1 where id=3;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set x=x-1 where id=3; update noar tt set x=x-1 where id=3;
update ti set x=x-1 where id=3; update noar ti set x=x-1 where id=3;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
# test clip at maximum # test clip at maximum
insert into tt values (4,pow(2,31)-10); insert into tt values (4,pow(2,31)-10);
insert into ti values (4,pow(2,31)-10); insert into ti values (4,pow(2,31)-10);
update tt set x=x+20 where id=4; update noar tt set x=x+20 where id=4;
update ti set x=x+20 where id=4; update noar ti set x=x+20 where id=4;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
insert into tt values (5,pow(2,31)-10); insert into tt values (5,pow(2,31)-10);
insert into ti values (5,pow(2,31)-10); insert into ti values (5,pow(2,31)-10);
update tt set x=x - -20 where id=5; update noar tt set x=x - -20 where id=5;
update ti set x=x - -20 where id=5; update noar ti set x=x - -20 where id=5;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
# test clip at minimum # test clip at minimum
insert into tt values (6,-pow(2,31)+10); insert into tt values (6,-pow(2,31)+10);
insert into ti values (6,-pow(2,31)+10); insert into ti values (6,-pow(2,31)+10);
update tt set x=x-20 where id=6; update noar tt set x=x-20 where id=6;
update ti set x=x-20 where id=6; update noar ti set x=x-20 where id=6;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
insert into tt values (7,-pow(2,31)+10); insert into tt values (7,-pow(2,31)+10);
insert into ti values (7,-pow(2,31)+10); insert into ti values (7,-pow(2,31)+10);
update tt set x=x + -20 where id=7; update noar tt set x=x + -20 where id=7;
update ti set x=x + -20 where id=7; update noar ti set x=x + -20 where id=7;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
......
...@@ -13,23 +13,23 @@ let $default_sql_mode = `select @@session.sql_mode`; ...@@ -13,23 +13,23 @@ let $default_sql_mode = `select @@session.sql_mode`;
create table t (id int primary key, x int not null); create table t (id int primary key, x int not null);
insert into t values (1,0); insert into t values (1,0);
update t set x=42 where id=1; update noar t set x=42 where id=1;
update t set x=x+1 where id=1; update noar t set x=x+1 where id=1;
update t set x=x-1 where id=1; update noar t set x=x-1 where id=1;
eval set session sql_mode="$default_sql_mode,traditional"; eval set session sql_mode="$default_sql_mode,traditional";
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update t set x=42 where id=1; update noar t set x=42 where id=1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update t set x=x+1 where id=1; update noar t set x=x+1 where id=1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update t set x=x-1 where id=1; update noar t set x=x-1 where id=1;
eval set session sql_mode="$default_sql_mode"; eval set session sql_mode="$default_sql_mode";
......
...@@ -16,44 +16,44 @@ insert into ti select * from tt; ...@@ -16,44 +16,44 @@ insert into ti select * from tt;
set tokudb_enable_fast_update=1; set tokudb_enable_fast_update=1;
set tokudb_disable_slow_update=1; set tokudb_disable_slow_update=1;
update tt set x=x+1 where id=1; update noar tt set x=x+1 where id=1;
update ti set x=x+1 where id=1; update noar ti set x=x+1 where id=1;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set x=x-2 where id=1; update noar tt set x=x-2 where id=1;
update ti set x=if(x<2,0,x-2) where id=1; update noar ti set x=if(x<2,0,x-2) where id=1;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set x=x+1 where id=1; update noar tt set x=x+1 where id=1;
update ti set x=x+1 where id=1; update noar ti set x=x+1 where id=1;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set x=x-1 where id=2; update noar tt set x=x-1 where id=2;
update ti set x=x-1 where id=2; update noar ti set x=x-1 where id=2;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
update tt set x=x+1 where id=2; update noar tt set x=x+1 where id=2;
update ti set x=x+1 where id=2; update noar ti set x=x+1 where id=2;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
# test clip at maximum # test clip at maximum
insert into tt values (4,pow(2,32)-10); insert into tt values (4,pow(2,32)-10);
insert into ti values (4,pow(2,32)-10); insert into ti values (4,pow(2,32)-10);
update tt set x=x+20 where id=4; update noar tt set x=x+20 where id=4;
update ti set x=x+20 where id=4; update noar ti set x=x+20 where id=4;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
# test clip at minimum # test clip at minimum
insert into tt values (5,10); insert into tt values (5,10);
insert into ti values (5,10); insert into ti values (5,10);
update tt set x=x-20 where id=5; update noar tt set x=x-20 where id=5;
update ti set x=if(x<20,0,x-20) where id=5; update noar ti set x=if(x<20,0,x-20) where id=5;
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
......
...@@ -14,19 +14,20 @@ connect (conn1,localhost,root,,); ...@@ -14,19 +14,20 @@ connect (conn1,localhost,root,,);
connection default; connection default;
set session tokudb_enable_fast_update=1; set session tokudb_enable_fast_update=1;
begin; begin;
update t set b=b+1 where id=1; update noar t set b=b+1 where id=1;
connection conn1; connection conn1;
set session tokudb_enable_fast_update=1; set session tokudb_enable_fast_update=1;
begin; begin;
update t set b=b-1 where id=2; update noar t set b=b-1 where id=2;
connection default; connection default;
send update t set b=b+1 where id=2; send update noar t set b=b+1 where id=2;
connection conn1; connection conn1;
error 1213; sleep 1;
update t set b=b-1 where id=1; error 1205,1213;
update noar t set b=b-1 where id=1;
rollback; rollback;
connection default; connection default;
......
...@@ -32,27 +32,27 @@ def test_int(t, u, n): ...@@ -32,27 +32,27 @@ def test_int(t, u, n):
print "insert into ti select * from tt;" print "insert into ti select * from tt;"
if u == 'unsigned': if u == 'unsigned':
print "update tt set x=if(x=0,0,x-1) where id=1;" print "update noar tt set x=if(x=0,0,x-1) where id=1;"
print "update ti set x=if(x=0,0,x-1) where id=1;" print "update noar ti set x=if(x=0,0,x-1) where id=1;"
print "update tt set x=if(x=0,0,x-1) where id=1;" print "update noar tt set x=if(x=0,0,x-1) where id=1;"
print "update ti set x=if(x=0,0,x-1) where id=1;" print "update noar ti set x=if(x=0,0,x-1) where id=1;"
print "update tt set x=if(x=0,0,x-1) where id=1;" print "update noar tt set x=if(x=0,0,x-1) where id=1;"
print "update ti set x=if(x=0,0,x-1) where id=1;" print "update noar ti set x=if(x=0,0,x-1) where id=1;"
print "update tt set x=if(x=0,0,x-1) where id=1;" print "update noar tt set x=if(x=0,0,x-1) where id=1;"
print "update ti set x=if(x=0,0,x-1) where id=1;" print "update noar ti set x=if(x=0,0,x-1) where id=1;"
print "# try to decrement when x=0" print "# try to decrement when x=0"
print "update tt set x=if(x=0,0,x-1) where id=1;" print "update noar tt set x=if(x=0,0,x-1) where id=1;"
print "update ti set x=if(x=0,0,x-1) where id=1;" print "update noar ti set x=if(x=0,0,x-1) where id=1;"
print "let $diff_tables = test.tt, test.ti;" print "let $diff_tables = test.tt, test.ti;"
print "source include/diff_tables.inc;" print "source include/diff_tables.inc;"
else: else:
print "replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;" print "replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;"
print "error ER_UNSUPPORTED_EXTENSION;" print "error ER_UNSUPPORTED_EXTENSION;"
print "update tt set x=if(x=0,0,x-1) where id=1;" print "update noar tt set x=if(x=0,0,x-1) where id=1;"
print "drop table tt, ti;" print "drop table tt, ti;"
......
...@@ -13,34 +13,34 @@ set tokudb_disable_slow_update=1; ...@@ -13,34 +13,34 @@ set tokudb_disable_slow_update=1;
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);
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update t set x=x+1 where ida=1; update noar t set x=x+1 where ida=1;
drop table t; drop table t;
# must have no clustering keys # 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));
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update t set x=x+1 where ida=1; update noar t set x=x+1 where ida=1;
drop table t; drop table t;
# update field must not be part of any key # 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)); 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));
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update t set x=x+1 where ida=1; update noar t set x=x+1 where ida=1;
drop table t; drop table t;
# must have no pk prefixed # 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)));
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update t set x=x+1 where id='hi'; update noar t set x=x+1 where id='hi';
drop table t; 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)));
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update t set x=x+1 where id='hi'; update noar t set x=x+1 where id='hi';
drop table t; drop table t;
# test for point updates on compound keys # test for point updates on compound keys
...@@ -49,20 +49,20 @@ insert into t values (1,2,3,0); ...@@ -49,20 +49,20 @@ insert into t values (1,2,3,0);
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update t set x=x+1 where ida=1; update noar t set x=x+1 where ida=1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
update t set x=x+1 where ida=1 and idb=2; update noar t set x=x+1 where ida=1 and idb=2;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
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 or idc=3;
update t set x=x+1 where ida=1 and idb=2 and idc=3; update noar t set x=x+1 where ida=1 and idb=2 and idc=3;
select * from t; select * from t;
update t set x=x+1 where idc=3 and ida=1 and idb=2; update noar t set x=x+1 where idc=3 and ida=1 and idb=2;
select * from t; select * from t;
drop table t; drop table t;
......
...@@ -12,11 +12,11 @@ set tokudb_disable_slow_upsert=1; ...@@ -12,11 +12,11 @@ set tokudb_disable_slow_upsert=1;
create table t0 (id int primary key, b binary(32)); create table t0 (id int primary key, b binary(32));
create table t1 like t0; create table t1 like t0;
insert into t0 values (1,'hi'),(2,'there'); insert noar into t0 values (1,'hi'),(2,'there');
select * from t0; select * from t0;
insert into t1 values (1,null),(2,null); insert noar into t1 values (1,null),(2,null);
insert into t1 values (1,null) on duplicate key update b='hi'; insert noar into t1 values (1,null) on duplicate key update b='hi';
insert into t1 values (2,null) on duplicate key update b='there'; insert noar into t1 values (2,null) on duplicate key update b='there';
select * from t1; select * from t1;
let $diff_tables = test.t0, test.t1; let $diff_tables = test.t0, test.t1;
......
...@@ -14,23 +14,23 @@ create table tt (id int primary key, c char(32), b binary(32)); ...@@ -14,23 +14,23 @@ create table tt (id int primary key, c char(32), b binary(32));
create table ti like tt; create table ti like tt;
alter table ti engine=innodb; alter table ti engine=innodb;
insert into tt values (1,null,null) on duplicate key update c='hi'; insert noar into tt values (1,null,null) on duplicate key update c='hi';
insert into ti values (1,null,null) on duplicate key update c='hi'; insert noar into ti values (1,null,null) on duplicate key update c='hi';
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
insert into tt values (1,null,null) on duplicate key update c='there'; insert noar into tt values (1,null,null) on duplicate key update c='there';
insert into ti values (1,null,null) on duplicate key update c='there'; insert noar into ti values (1,null,null) on duplicate key update c='there';
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
insert into tt values (1,null,null) on duplicate key update b='you'; insert noar into tt values (1,null,null) on duplicate key update b='you';
insert into ti values (1,null,null) on duplicate key update b='you'; insert noar into ti values (1,null,null) on duplicate key update b='you';
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
insert into tt values (1,null,null) on duplicate key update b='people'; insert noar into tt values (1,null,null) on duplicate key update b='people';
insert into ti values (1,null,null) on duplicate key update b='people'; insert noar into ti values (1,null,null) on duplicate key update b='people';
let $diff_tables = test.tt, test.ti; let $diff_tables = test.tt, test.ti;
source include/diff_tables.inc; source include/diff_tables.inc;
......
...@@ -13,19 +13,20 @@ connect (conn1,localhost,root,,); ...@@ -13,19 +13,20 @@ connect (conn1,localhost,root,,);
connection default; connection default;
set session tokudb_enable_fast_upsert=1; set session tokudb_enable_fast_upsert=1;
begin; begin;
insert into t (id) values (1) on duplicate key update b=b+1; insert noar into t (id) values (1) on duplicate key update b=b+1;
connection conn1; connection conn1;
set session tokudb_enable_fast_upsert=1; set session tokudb_enable_fast_upsert=1;
begin; begin;
insert into t (id) values (2) on duplicate key update b=b-1; insert noar into t (id) values (2) on duplicate key update b=b-1;
connection default; connection default;
send insert into t (id) values (2) on duplicate key update b=b+1; send insert noar into t (id) values (2) on duplicate key update b=b+1;
connection conn1; connection conn1;
error 1213; sleep 1;
insert into t (id) values (1) on duplicate key update b=b-1; error 1205,1213;
insert noar into t (id) values (1) on duplicate key update b=b-1;
rollback; rollback;
connection default; connection default;
......
...@@ -29,19 +29,19 @@ def test_upsert_int(t, u, n): ...@@ -29,19 +29,19 @@ def test_upsert_int(t, u, n):
print " z %s %s %s," % (t, u, n) print " z %s %s %s," % (t, u, n)
print " a char(32), aa varchar(32)" print " a char(32), aa varchar(32)"
print ");" print ");"
print "insert into tt (id) values (1),(2),(3) on duplicate key update x=0;" print "insert noar into tt (id) values (1),(2),(3) on duplicate key update x=0;"
print "insert into tt (id) values (1) on duplicate key update y=0,z=42;" print "insert noar into tt (id) values (1) on duplicate key update y=0,z=42;"
print "insert into tt (id) values (1) on duplicate key update y=y+1,z=z+100;" print "insert noar into tt (id) values (1) on duplicate key update y=y+1,z=z+100;"
print "insert into tt (id) values (1) on duplicate key update y=y-1;" print "insert noar into tt (id) values (1) on duplicate key update y=y-1;"
print "insert into tt (id) values (1) on duplicate key update z=z-100;" print "insert noar into tt (id) values (1) on duplicate key update z=z-100;"
print "create table ti like tt;" print "create table ti like tt;"
print "alter table ti engine=innodb;" print "alter table ti engine=innodb;"
print "insert into ti (id) values (1),(2),(3) on duplicate key update x=0;" print "insert noar into ti (id) values (1),(2),(3) on duplicate key update x=0;"
print "insert into ti (id) values (1) on duplicate key update y=0,z=42;" print "insert noar into ti (id) values (1) on duplicate key update y=0,z=42;"
print "insert into ti (id) values (1) on duplicate key update y=y+1,z=z+100;" print "insert noar into ti (id) values (1) on duplicate key update y=y+1,z=z+100;"
print "insert into ti (id) values (1) on duplicate key update y=y-1;" print "insert noar into ti (id) values (1) on duplicate key update y=y-1;"
print "insert into ti (id) values (1) on duplicate key update z=z-100;" print "insert noar into ti (id) values (1) on duplicate key update z=z-100;"
print "let $diff_tables = test.tt, test.ti;" print "let $diff_tables = test.tt, test.ti;"
print "source include/diff_tables.inc;" print "source include/diff_tables.inc;"
......
...@@ -13,34 +13,34 @@ set tokudb_disable_slow_upsert=1; ...@@ -13,34 +13,34 @@ set tokudb_disable_slow_upsert=1;
create table t (a int, b char(32), c varchar(32), d blob); create table t (a int, b char(32), c varchar(32), d blob);
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into t values (1,null,null,null) on duplicate key update a=42; insert noar into t values (1,null,null,null) on duplicate key update a=42;
drop table t; drop table t;
# must have no clustering keys # 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)); 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/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into t values (1,null,null,null,null) on duplicate key update a=42; insert noar into t values (1,null,null,null,null) on duplicate key update a=42;
drop table t; drop table t;
# must have no secondary keys # must have no secondary keys
create table t (id int primary key, a int, b char(32), c varchar(32), d blob, key(c)); 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/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into t values (1,null,null,null,null) on duplicate key update a=42; insert noar into t values (1,null,null,null,null) on duplicate key update a=42;
drop table t; drop table t;
# update field must not be part of any key # 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)); 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/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into t values (1,2,null,null,null) on duplicate key update a=42; insert noar into t values (1,2,null,null,null) on duplicate key update a=42;
drop table t; drop table t;
create table t (id int, a int, b char(32), c varchar(32), d blob, primary key(a, id)); 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/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into t values (1,2,null,null,null) on duplicate key update a=42; insert noar into t values (1,2,null,null,null) on duplicate key update a=42;
drop table t; drop table t;
...@@ -12,24 +12,24 @@ set tokudb_disable_slow_upsert=1; ...@@ -12,24 +12,24 @@ set tokudb_disable_slow_upsert=1;
let $default_sql_mode = `select @@session.sql_mode`; let $default_sql_mode = `select @@session.sql_mode`;
create table t (id int primary key, x int not null); create table t (id int primary key, x int not null);
insert into t values (1,0); insert noar into t values (1,0);
insert into t values (1,0) on duplicate key update x=42; insert noar into t values (1,0) on duplicate key update x=42;
insert into t values (1,0) on duplicate key update x=x+1; insert noar into t values (1,0) on duplicate key update x=x+1;
insert into t values (1,0) on duplicate key update x=x-1; insert noar into t values (1,0) on duplicate key update x=x-1;
eval set session sql_mode="$default_sql_mode,traditional"; eval set session sql_mode="$default_sql_mode,traditional";
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into t values (1,0) on duplicate key update x=42; insert noar into t values (1,0) on duplicate key update x=42;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into t values (1,0) on duplicate key update x=x+1; insert noar into t values (1,0) on duplicate key update x=x+1;
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION; error ER_UNSUPPORTED_EXTENSION;
insert into t values (1,0) on duplicate key update x=x-1; insert noar into t values (1,0) on duplicate key update x=x-1;
eval set session sql_mode="$default_sql_mode"; eval set session sql_mode="$default_sql_mode";
......
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