Commit a3d07b1c authored by unknown's avatar unknown
Browse files

a fix (bug #11215: BIGINT: can't set DEFAULT to minimum end-range)


sql/item.cc:
  a fix (bug #11215: BIGINT: can't set DEFAULT to minimum end-range)
  Pass unsig=1 to the constructor.
parent 10986dba
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -928,3 +928,9 @@ select * from t1 where a = -0.00;
a
0.00
drop table t1;
create table t1 (col1 bigint default -9223372036854775808);
insert into t1 values (default);
select * from t1;
col1
-9223372036854775808
drop table t1;
+9 −0
Original line number Diff line number Diff line
@@ -964,3 +964,12 @@ insert into t1 values (0.00);
select * from t1 where a > -0.00;
select * from t1 where a = -0.00;
drop table t1;

#
# Bug #11215: a problem with LONGLONG_MIN
#

create table t1 (col1 bigint default -9223372036854775808);
insert into t1 values (default);
select * from t1;
drop table t1;
+1 −1
Original line number Diff line number Diff line
@@ -3573,7 +3573,7 @@ Item *Item_int_with_ref::new_item()

Item_num *Item_uint::neg()
{
  Item_decimal *item= new Item_decimal(value, 0);
  Item_decimal *item= new Item_decimal(value, 1);
  return item->neg();
}