List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 16 1999 12:30am
Subject:Inserts wrong value into BIGINT UNSIGNED
View as plain text  
>>>>> "User" == User Rick <rick@stripped> writes:

>> Description:  An insert into a BIGINT UNSIGNED value with bit 63 set causes the
> wrong value to be inserted.
>> How-To-Repeat:
User> 	create table test (
User> 	id bigint unsigned ) ;

User> 	insert into test( id ) values ( 10694134218556599365 );

User> 	select * from test;

User> ... returns an incorrect value.

>> Fix:
User> I believe clearing the high bit helps, but I haven't tested thoroughly because
User> of the next bug report...

Hi!

The problem is the lex part of mysql returns numbers > 9223372036854775807
as type 'double'.

There is a note about this in the'
'Known errors and design deficiencies in MySQL'
manual section.

This isn't that trivial to fix so this is still on the TODO.

Regards,
Monty
Thread
Inserts wrong value into BIGINT UNSIGNEDUser Rick13 Sep
  • RE: Inserts wrong value into BIGINT UNSIGNEDBob Kline13 Sep
    • Re: Inserts wrong value into BIGINT UNSIGNEDRick Moore13 Sep
  • Inserts wrong value into BIGINT UNSIGNEDMichael Widenius16 Sep
  • Re: Inserts wrong value into BIGINT UNSIGNEDRick Moore16 Sep
    • Re: Inserts wrong value into BIGINT UNSIGNEDMichael Widenius16 Sep
  • Re: Inserts wrong value into BIGINT UNSIGNEDRick Moore16 Sep
    • Re: Inserts wrong value into BIGINT UNSIGNEDMichael Widenius17 Sep
  • Re: Inserts wrong value into BIGINT UNSIGNEDRick Moore17 Sep