Mysql: Warning: #1264 Out of range value adjusted

Published by

Posted on November 17, 2011

Full Error: Warning: #1264 Out of range value adjusted for column ‘id’ at row 1

We have a database that was used to store some valuable data. The Id column was set to auto increment when a new record was inserted. After about 127 records we started to get the above error message. come to find out we designed the column to use tinyint instead of INT. TinyINT has a max value of 127 , while the record will insert into the table. The id value remained at 127 for all records after. This could have been a huge problem with a larger and high volume application. We ignored the error for about 30 days as it was a warning and not a true error.

Despite what This blog says to issue the following SET GLOBAL SQL_MODE=”; . I would recommend exploring all options before changing the value of the sql mode.

Please check the following resource links to help you make a decision
Numeric Types
MySQL Modes