Description:
Data corruption with the InnoDB engine when running an update query. An example is given below. This has been confirmed happening on both Linux and Windows.
mysql> select ProductKey, InsertionOrder, Id from Campaign limit 10;
+------------+----------------+--------+
| ProductKey | InsertionOrder | Id |
+------------+----------------+--------+
| 1 | | demo |
| 2 | NULL | Camp_A |
| 2 | | Camp_B |
| 2 | NULL | Camp_C |
| 2 | | Camp_D |
| 1 | NULL | sv |
| 1 | NULL | qw |
| 4 | NULL | C0001 |
| 4 | | C1002 |
| 4 | | C1003 |
+------------+----------------+--------+
10 rows in set (0.00 sec)
mysql> update Campaign set InsertionOrder = '' where InsertionOrder is NULL;
Query OK, 102 rows affected (0.02 sec)
Rows matched: 102 Changed: 102 Warnings: 0
mysql> select ProductKey, InsertionOrder, Id from Campaign limit 10;
+-------------+----------------+--------+
| ProductKey | InsertionOrder | Id |
+-------------+----------------+--------+
| 1 | | demo |
| 2 | NULL | Camp_A |
| 2 | | Camp_B |
| 2 | NULL | Camp_C |
| -2147483646 | | Camp_D |
| 1 | NULL | sv |
| 1 | NULL | qw |
| 4 | NULL | C0001 |
| 4 | | C1002 |
| 4 | | C1003 |
+-------------+----------------+--------+
10 rows in set (0.00 sec)
How to repeat:
Load the attached dumpfile then run the following query.
mysql5.0> UPDATE Campaign SET InsertionOrder = '' WHERE InsertionOrder IS NULL;