MySQL update seems to update with a magic number of 2147483647 when I try to update with 0123456789.
Somewhere, MySQL seems to associate one number for another on an INT column in any schema. Where do I even look for such an association. Details of this are below.
This update does what it is suppose to and enters in 012345678 into the ContactPhone2 column for the appropriate row.
UPDATE `alacarte`.`customercontacts` SET `ContactPhone2`='012345678' WHERE `CustomerID`='cust-000004' and`ContactID`='1'
This update actually enters in 2147483647 in the ContactPhone2 column on the appropriate row; far from 0123456789.
UPDATE `alacarte`.`customercontacts` SET `ContactPhone2`='0123456789' WHERE `CustomerID`='cust-000004' and`ContactID`='1'
Datatype for the ContactPhone2 is INT(10) with a default value of NULL and NO parameters set (OK, NN, AI, etc) This is from the MYSQL general log. For the 012345678 update.
130101 17:51:43 89 Query set autocommit=0
130101 17:51:44 89 Prepare UPDATE `alacarte`.`customercontacts` SET `ContactPhone2`='012345678' WHERE `CustomerID`='cust-000004' and`ContactID`='1'
89 Execute UPDATE `alacarte`.`customercontacts` SET `ContactPhone2`='012345678' WHERE `CustomerID`='cust-000004' and`ContactID`='1'
89 Query commit
89 Close stmt
And the log entry for the 0123456789 update.
130101 17:51:48 89 Query set autocommit=0
130101 17:51:49 89 Prepare UPDATE `alacarte`.`customercontacts` SET `ContactPhone2`='0123456789' WHERE `CustomerID`='cust-000004' and`ContactID`='1'
89 Execute UPDATE `alacarte`.`customercontacts` SET `ContactPhone2`='0123456789' WHERE `CustomerID`='cust-000004' and`ContactID`='1'
89 Query commit
89 Close stmt
Updating with 0123456780 Works, so it is not the length of digits.
This happens on ANY column throughout the database with an INT(10+) but not on VARCHAR columns.
Even better is it does the same thing on another schema called thedesignedge that was the old schema that has since been copied and renamed, but it is still active in mysql although unused.
There are NO TRIGGERS running on the column, and only one trigger running on the table on the ContactID column. No errors are given either.
Queries have been generally made through MySQL workbench, although I tried once to directly enter in the update query through the shell in terminal and got the same results.
Somewhere, MySQL seems to associate one number for another on an INT column in any schema. Where do I even look for such an association.
We have not done anything with caching or indexing yet, aside for whatever MySQL defaults to. We are running mysql 5.5.29