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


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



Reply via email to