Bug #45957 Showing old data after update
Submitted: 6 Jul 2009 5:17 Modified: 6 Jul 2009 8:14
Reporter: Nirmal Natarajan Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.34 OS:Windows (Windows Server 2008)
Assigned to: CPU Architecture:Any
Tags: cache, query, UPDATE

[6 Jul 2009 5:17] Nirmal Natarajan
Description:
I had this value in one of the columns (int 50): 2147483647
Later I updated it to: 9442349493

MySQL says it updated the row.

But when I SELECT the values, it showed the old value for the column: 2147483647

I tried updating the column with a different value: 123456
This was successful. So I updated the column again with the value: 9442349493

But it reverted to the value: 2147483647

I thought it would be the problem with the cache and tried restarting the server and even the computer. But no luck. Why not it update the column with that specific integer?

How to repeat:
I don't think this can be intentionally repeated.
[6 Jul 2009 6:07] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

9442349493 is out of range for INT column. Please check warnings:

mysql> create temporary table t1(f1 int);
Query OK, 0 rows affected (0.07 sec)

mysql> insert into t1 values(2147483647);
Query OK, 1 row affected (0.00 sec)

mysql> \W
Show warnings enabled.
mysql> update t1 set f1=9442349493;
Query OK, 0 rows affected, 1 warning (0.09 sec)
Rows matched: 1  Changed: 0  Warnings: 1

Warning (Code 1264): Out of range value for column 'f1' at row 1
mysql> select * from t1;
+------------+
| f1         |
+------------+
| 2147483647 | 
+------------+
1 row in set (0.00 sec)
[6 Jul 2009 8:14] Nirmal Natarajan
Thank you for the clarification!
Such a basic property didn't strike my mind.