Commit dff7a5af authored by unknown's avatar unknown

Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1-build

into  mysql.com:/home/kent/bk/bug30069/mysql-4.1-build

parents 49472b07 568f6244
...@@ -135,3 +135,9 @@ t2.value64=t1.value64; ...@@ -135,3 +135,9 @@ t2.value64=t1.value64;
value64 value32 value64 value32 value64 value32 value64 value32
9223372036854775807 2 9223372036854775807 4 9223372036854775807 2 9223372036854775807 4
drop table t1, t2; drop table t1, t2;
create table t1 (sint64 bigint not null);
insert into t1 values (-9223372036854775808);
select * from t1;
sint64
-9223372036854775808
drop table t1;
...@@ -107,4 +107,13 @@ t2.value64=t1.value64; ...@@ -107,4 +107,13 @@ t2.value64=t1.value64;
drop table t1, t2; drop table t1, t2;
# Test for BUG#30069, can't handle bigint -9223372036854775808 on
# x86_64, with some GCC versions and optimizations.
create table t1 (sint64 bigint not null);
insert into t1 values (-9223372036854775808);
select * from t1;
drop table t1;
# End of 4.1 tests # End of 4.1 tests
...@@ -802,7 +802,7 @@ int my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), ...@@ -802,7 +802,7 @@ int my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
{ {
if (val < 0) if (val < 0)
{ {
val= -val; val= -(unsigned long int)val;
*dst++= '-'; *dst++= '-';
len--; len--;
sign= 1; sign= 1;
...@@ -838,7 +838,7 @@ int my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), ...@@ -838,7 +838,7 @@ int my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
{ {
if (val < 0) if (val < 0)
{ {
val = -val; val = -(ulonglong)val;
*dst++= '-'; *dst++= '-';
len--; len--;
sign= 1; sign= 1;
......
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