Skip to main content
Example
Source Link
csl
  • 11.4k
  • 5
  • 64
  • 92

It's not a bug, it's merely a case of integer overflow.

If you need your number-in-string value to max out, you should add code to do that, either when you do the insert, or as a trigger.

See http://dev.mysql.com/doc/refman/5.0/en/type-conversion.html for more information.

You can also experiment with small selects (untested, I don't have MySQL access here):

SELECT CAST('2123456789012345678' AS INT(11)) SELECT CAST('21234567890123456789' AS INT(11)) 

It's not a bug, it's merely a case of integer overflow.

It's not a bug, it's merely a case of integer overflow.

If you need your number-in-string value to max out, you should add code to do that, either when you do the insert, or as a trigger.

See http://dev.mysql.com/doc/refman/5.0/en/type-conversion.html for more information.

You can also experiment with small selects (untested, I don't have MySQL access here):

SELECT CAST('2123456789012345678' AS INT(11)) SELECT CAST('21234567890123456789' AS INT(11)) 
Post Undeleted by csl
Removed last line
Source Link
csl
  • 11.4k
  • 5
  • 64
  • 92

It's not a bug, it's merely a case of integer overflow.

If you want a too big value to max out to a given value, you should write a trigger for the table.

It's not a bug, it's merely a case of integer overflow.

If you want a too big value to max out to a given value, you should write a trigger for the table.

It's not a bug, it's merely a case of integer overflow.

Post Deleted by csl
Source Link
csl
  • 11.4k
  • 5
  • 64
  • 92

It's not a bug, it's merely a case of integer overflow.

If you want a too big value to max out to a given value, you should write a trigger for the table.