List:General Discussion« Previous MessageNext Message »
From:Gleb Paharenko Date:December 23 2005 9:17pm
Subject:Re: Strange behavior with integer unsigned type...
View as plain text  
Hello.

On both 4.1.16 and 5.0.17 I've got the same results, however not 2^32,
but 18446744073709551615. 4.0 is deprecated and its results could be
different. Please provide exact SQL statement which you're using if you
still think that MySQL behaves weirdly with unsigned integers. In the
manual we have:
  mysql> SELECT CAST(1-2 AS UNSIGNED)
        -> 18446744073709551615


Marko Domanovic wrote:
> I noticed rather interesting thing... If you deduct 1 from the 0 which is 
> stored in integer unsigned field, you get 2^32, not 0. I think that's how 
> things are not working with version 4, and want to ask is this behavior bug 
> or feature in mysql version 5, and is it customizable?
> 
> Greetings,
> Marko 
> 
> 


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



Thread
Strange behavior with integer unsigned type...Marko Domanovic23 Dec
  • Re: Strange behavior with integer unsigned type...Gleb Paharenko23 Dec
    • Re: Strange behavior with integer unsigned type...James Harvard24 Dec
Re: Strange behavior with integer unsigned type...Marko Domanovic24 Dec
  • Re: Strange behavior with integer unsigned type...Gleb Paharenko30 Dec
    • Re: Strange behavior with integer unsigned type...Stephen Cook31 Dec