Comment 5 for bug 1285070

Revision history for this message
Krunal Bauskar (krunal-bauskar) wrote :

This is no more an issue with latest-5.6. Please upgrade and re-try.

source-node:
mysql> CREATE TABLE `t2` (
    -> `id` int(11) NOT NULL AUTO_INCREMENT,
    -> `idd` int(11) DEFAULT NULL,
    -> PRIMARY KEY (`id`)
    -> ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COLLATE=utf8_bin
    -> ;
Query OK, 0 rows affected (0.06 sec)

mysql> select * from t2;
Empty set (0.00 sec)

mysql> insert into t2 values (1, 100);
Query OK, 1 row affected (0.02 sec)

mysql> select * from t2;
+----+------+
| id | idd |
+----+------+
| 1 | 100 |
+----+------+
1 row in set (0.00 sec)

mysql> update t2 set id=40 where id=1;
Query OK, 1 row affected (0.02 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> select * from t2;
+----+------+
| id | idd |
+----+------+
| 40 | 100 |
+----+------+
1 row in set (0.00 sec)

mysql> replace t2 values(40,2);
Query OK, 2 rows affected (0.01 sec)

mysql> select * from t2;
+----+------+
| id | idd |
+----+------+
| 40 | 2 |
+----+------+
1 row in set (0.00 sec)

mysql> show create table t2;
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t2 | CREATE TABLE `t2` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idd` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COLLATE=utf8_bin |
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> select * from t2;
+----+------+
| id | idd |
+----+------+
| 40 | 2 |
| 41 | 0 |
+----+------+
2 rows in set (0.00 sec)

mysql>

---------

replicated-node

mysql> select * from t2;
+----+------+
| id | idd |
+----+------+
| 40 | 100 |
+----+------+
1 row in set (0.00 sec)

mysql> select * from t2;
+----+------+
| id | idd |
+----+------+
| 40 | 2 |
+----+------+
1 row in set (0.00 sec)

mysql> show create table t2;
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t2 | CREATE TABLE `t2` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idd` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COLLATE=utf8_bin |
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> insert into t2(idd) values(0);
Query OK, 1 row affected (0.01 sec)

mysql> select * from t2;
+----+------+
| id | idd |
+----+------+
| 40 | 2 |
| 41 | 0 |
+----+------+
2 rows in set (0.00 sec)

mysql>