Hello.


I've submitted a bug  http://bugs.mysql.com/7036.





Robin Bryce <[EMAIL PROTECTED]> wrote:

> Hi,

> 

> I'm having trouble converting to and from strings that represent 

> unsigned BIGINT's.

> 

> My server is MySQL 4.1.7-standard and

> 

> the following selects were entered at the prompt of my client with 

> version "mysql Ver 14.7 Distrib 4.1.7, for pc-linux (i686)".

> 

> select cast(1-2, unsigned);

> 

> gives the expected 18446744073709551615. This is one of the 'cast' 

> examples on http://dev.mysql.com/doc/mysql/en/Cast_Functions.html.

> 

> select cast(18446744073709551615 as char);

> 

> yields the expected '18446744073709551615'.

> 

> The converse doesn't hold:

> 

> cast('18446744073709551615' as unsigned);

> 

> yields '9223372036854775807' better known as '0x7fffffffffffffff'.

> 

> Can anyone tell me what is happening here ?

> 

> Thanks,

> 

> Robin Bryce

> 

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to