mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Fix for BUG#4488: first portion: sign aware '<' and '>' comparisons.
This commit is contained in:
@@ -383,3 +383,42 @@ select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
|
||||
select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0;
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
# Fix for bug#4488
|
||||
#
|
||||
create table t1 (x bigint unsigned not null);
|
||||
insert into t1(x) values (0xfffffffffffffff0);
|
||||
insert into t1(x) values (0xfffffffffffffff1);
|
||||
select * from t1;
|
||||
select count(*) from t1 where x>0;
|
||||
select count(*) from t1 where x=0;
|
||||
select count(*) from t1 where x<0;
|
||||
select count(*) from t1 where x < -16;
|
||||
select count(*) from t1 where x = -16;
|
||||
select count(*) from t1 where x > -16;
|
||||
|
||||
create table t2 (x bigint not null);
|
||||
insert into t2(x) values (0xfffffffffffffff0);
|
||||
insert into t2(x) values (0xfffffffffffffff1);
|
||||
select * from t2;
|
||||
select count(*) from t2 where x>0;
|
||||
select count(*) from t2 where x=0;
|
||||
select count(*) from t2 where x<0;
|
||||
select count(*) from t2 where x < -16;
|
||||
select count(*) from t2 where x = -16;
|
||||
select count(*) from t2 where x > -16;
|
||||
|
||||
drop table t1;
|
||||
create table t1 (x bigint unsigned not null primary key) engine=innodb;
|
||||
insert into t1(x) values (0xfffffffffffffff0);
|
||||
insert into t1(x) values (0xfffffffffffffff1);
|
||||
select * from t1;
|
||||
select count(*) from t1 where x>0;
|
||||
select count(*) from t1 where x=0;
|
||||
select count(*) from t1 where x<0;
|
||||
select count(*) from t1 where x < -16;
|
||||
select count(*) from t1 where x = -16;
|
||||
select count(*) from t1 where x > -16;
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
Reference in New Issue
Block a user