Commit c20453ba authored by monty@narttu.mysql.fi's avatar monty@narttu.mysql.fi

Integer values between 9223372036854775807 and 9999999999999999999 are now

regarded as unsigned longlongss, not as floats. This make these values work
similar to values between 10000000000000000000 and 18446744073709551615.
parent 61213dbc
...@@ -6,13 +6,13 @@ select 9223372036854775807,-009223372036854775808; ...@@ -6,13 +6,13 @@ select 9223372036854775807,-009223372036854775808;
9223372036854775807 -9223372036854775808 9223372036854775807 -9223372036854775808
select +9999999999999999999,-9999999999999999999; select +9999999999999999999,-9999999999999999999;
+9999999999999999999 -9999999999999999999 +9999999999999999999 -9999999999999999999
10000000000000000000 -10000000000000000000 9999999999999999999 -10000000000000000000
select cast(9223372036854775808 as unsigned)+1; select cast(9223372036854775808 as unsigned)+1;
cast(9223372036854775808 as unsigned)+1 cast(9223372036854775808 as unsigned)+1
9223372036854775809 9223372036854775809
select 9223372036854775808+1; select 9223372036854775808+1;
9223372036854775808+1 9223372036854775808+1
9223372036854775808 9223372036854775809
drop table if exists t1; drop table if exists t1;
create table t1 (a bigint unsigned not null, primary key(a)); create table t1 (a bigint unsigned not null, primary key(a));
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE); insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE);
......
...@@ -5,12 +5,6 @@ select 0,256,00000000000000065536,2147483647,-2147483648,2147483648,+4294967296; ...@@ -5,12 +5,6 @@ select 0,256,00000000000000065536,2147483647,-2147483648,2147483648,+4294967296;
select 9223372036854775807,-009223372036854775808; select 9223372036854775807,-009223372036854775808;
select +9999999999999999999,-9999999999999999999; select +9999999999999999999,-9999999999999999999;
select cast(9223372036854775808 as unsigned)+1; select cast(9223372036854775808 as unsigned)+1;
#
# We need to do a REPLACE here as the atof() function returns different
# values on True64 and HPUX11
#
--replace_result 9223372036854775800 9223372036854775808
select 9223372036854775808+1; select 9223372036854775808+1;
# #
# In 3.23 we have to disable the test of column to bigint as # In 3.23 we have to disable the test of column to bigint as
......
...@@ -212,6 +212,11 @@ public: ...@@ -212,6 +212,11 @@ public:
String *val_str(String*); String *val_str(String*);
void make_field(Send_field *field); void make_field(Send_field *field);
Item *new_item() { return new Item_uint(name,max_length); } Item *new_item() { return new Item_uint(name,max_length); }
bool fix_fields(THD *thd,struct st_table_list *table_list)
{
unsigned_flag= 1;
return 0;
}
void print(String *str); void print(String *str);
unsigned int size_of() { return sizeof(*this);} unsigned int size_of() { return sizeof(*this);}
}; };
......
...@@ -407,7 +407,7 @@ inline static uint int_token(const char *str,uint length) ...@@ -407,7 +407,7 @@ inline static uint int_token(const char *str,uint length)
{ {
cmp=longlong_str; cmp=longlong_str;
smaller=LONG_NUM; smaller=LONG_NUM;
bigger=REAL_NUM; bigger= ULONGLONG_NUM;
} }
} }
while (*cmp && *cmp++ == *str++) ; while (*cmp && *cmp++ == *str++) ;
......
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