mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
2f83aed670
git-svn-id: file:///svn/mysql/tests/mysql-test@55030 c7de825b-a66e-492c-adef-691d508d4ae1
62 lines
1.6 KiB
Text
62 lines
1.6 KiB
Text
source include/have_tokudb.inc;
|
|
source include/have_innodb.inc;
|
|
|
|
set default_storage_engine='tokudb';
|
|
|
|
disable_warnings;
|
|
drop table if exists t;
|
|
enable_warnings;
|
|
|
|
create table tt (id int primary key, x int unsigned);
|
|
insert into tt values (1,0),(2,pow(2,32)-1);
|
|
create table ti like tt;
|
|
alter table ti engine=innodb;
|
|
insert into ti select * from tt;
|
|
|
|
set tokudb_disable_slow_update=1;
|
|
|
|
update noar tt set x=x+1 where id=1;
|
|
update noar ti set x=x+1 where id=1;
|
|
let $diff_tables = test.tt, test.ti;
|
|
source include/diff_tables.inc;
|
|
|
|
update noar tt set x=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;
|
|
source include/diff_tables.inc;
|
|
|
|
update noar tt set x=x+1 where id=1;
|
|
update noar ti set x=x+1 where id=1;
|
|
let $diff_tables = test.tt, test.ti;
|
|
source include/diff_tables.inc;
|
|
|
|
update noar tt set x=x-1 where id=2;
|
|
update noar ti set x=x-1 where id=2;
|
|
let $diff_tables = test.tt, test.ti;
|
|
source include/diff_tables.inc;
|
|
|
|
update noar tt set x=x+1 where id=2;
|
|
update noar ti set x=x+1 where id=2;
|
|
let $diff_tables = test.tt, test.ti;
|
|
source include/diff_tables.inc;
|
|
|
|
# test clip at maximum
|
|
insert into tt values (4,pow(2,32)-10);
|
|
insert into ti values (4,pow(2,32)-10);
|
|
update noar tt set x=x+20 where id=4;
|
|
update noar ti set x=x+20 where id=4;
|
|
let $diff_tables = test.tt, test.ti;
|
|
source include/diff_tables.inc;
|
|
|
|
# test clip at minimum
|
|
insert into tt values (5,10);
|
|
insert into ti values (5,10);
|
|
update noar tt set x=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;
|
|
source include/diff_tables.inc;
|
|
|
|
drop table tt, ti;
|
|
|
|
|
|
|