summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb/r/fast_update_uint_bounds.result
blob: aa9ff2cbe33671a86dab5b7be3c9b84a68160b78 (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
create table tt (id int primary key, x int unsigned) engine = tokudb;
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_enable_fast_update=1;
set session sql_mode=(select replace(@@sql_mode,'STRICT_TRANS_TABLES',''));
set session sql_mode=(select replace(@@sql_mode,'STRICT_ALL_TABLES',''));
update tt set x=x+1 where id=1;
update ti set x=x+1 where id=1;
include/diff_tables.inc [test.tt, test.ti]
update tt set x=x-2 where id=1;
update ti set x=if(x<2,0,x-2) where id=1;
include/diff_tables.inc [test.tt, test.ti]
update tt set x=x+1 where id=1;
update ti set x=x+1 where id=1;
include/diff_tables.inc [test.tt, test.ti]
update tt set x=x-1 where id=2;
update ti set x=x-1 where id=2;
include/diff_tables.inc [test.tt, test.ti]
update tt set x=x+1 where id=2;
update ti set x=x+1 where id=2;
include/diff_tables.inc [test.tt, test.ti]
insert into tt 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 ti set x=x+20 where id=4;
Warnings:
Warning	1264	Out of range value for column 'x' at row 1
include/diff_tables.inc [test.tt, test.ti]
insert into tt values (5,10);
insert into ti values (5,10);
update tt set x=x-20 where id=5;
update ti set x=if(x<20,0,x-20) where id=5;
include/diff_tables.inc [test.tt, test.ti]
drop table tt, ti;