Comment 4 for bug 587170

Revision history for this message
Ovais Tariq (ovais-tariq) wrote :

The workaround seems to be to disable wsrep_auto_increment_control across the cluster.

node1> set global wsrep_auto_increment_control=0;
Query OK, 0 rows affected (0.00 sec)

node2> set global wsrep_auto_increment_control=0;
Query OK, 0 rows affected (0.00 sec)

node3> set global wsrep_auto_increment_control=0;
Query OK, 0 rows affected (0.00 sec)

node1> create table t (i int);
Query OK, 0 rows affected (0.69 sec)

node1> insert into t values (1),(2),(3),(4),(5);
Query OK, 5 rows affected (0.00 sec)
Records: 5 Duplicates: 0 Warnings: 0

node1> ALTER TABLE `t` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
Query OK, 5 rows affected (1.44 sec)
Records: 5 Duplicates: 0 Warnings: 0

node1> select * from t;
+----+------+
| id | i |
+----+------+
| 1 | 1 |
| 4 | 2 |
| 7 | 3 |
| 10 | 4 |
| 13 | 5 |
+----+------+
5 rows in set (0.00 sec)

node2> select * from t;
+----+------+
| id | i |
+----+------+
| 1 | 1 |
| 4 | 2 |
| 7 | 3 |
| 10 | 4 |
| 13 | 5 |
+----+------+
5 rows in set (0.00 sec)

node3> select * from t;
+----+------+
| id | i |
+----+------+
| 1 | 1 |
| 4 | 2 |
| 7 | 3 |
| 10 | 4 |
| 13 | 5 |
+----+------+