Bug #24303 Wrong result for UPDATE IGNORE for NDB table
Submitted: 14 Nov 2006 15:38 Modified: 6 Dec 2006 10:44
Reporter: Serge Kozlov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1.14 OS:Linux (Linux FC4)
Assigned to: Martin Skold CPU Architecture:Any

[14 Nov 2006 15:38] Serge Kozlov
Description:
Behaviour UPDATE IGNORE isn't correct if duplicate-key conflicts occur.

How to repeat:
1. Start a cluster (1 ndb_mgmd, 2 ndbd, 1 mysqld) with simple configuration (see
private section)
2. Run mysql and repeat following commands:
mysql> use test;
Database changed
mysql> create table t1 (a int not null primary key, b int) engine=ndb;
Query OK, 0 rows affected (2.29 sec)

mysql> insert into t1 values (1,10), (2,20), (3,30);
Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> select * from t1;
+---+------+
| a | b    |
+---+------+
| 3 |   30 |
| 1 |   10 |
| 2 |   20 |
+---+------+
3 rows in set (0.04 sec)

mysql> update ignore t1 set a=1 where a=3;
Query OK, 0 rows affected (0.01 sec)
Rows matched: 1  Changed: 0  Warnings: 0

mysql> select * from t1;
+---+-----------+
| a | b         |
+---+-----------+
| 1 |        10 |
| 2 |        20 |
| 3 | 134217728 |
+---+-----------+
3 rows in set (0.04 sec)

mysql>
[29 Nov 2006 12:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/16092

ChangeSet@1.2284, 2006-11-29 11:53:43+01:00, mskold@mysql.com +2 -0
  bug#24303  Wrong result for UPDATE IGNORE for NDB table: Added test case
[29 Nov 2006 13:13] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/16101

ChangeSet@1.2327, 2006-11-29 13:23:19+01:00, mskold@mysql.com +2 -0
  bug#24303  Wrong result for UPDATE IGNORE for NDB table: Read all fields for UPDATE IGNORE with pk
[29 Nov 2006 14:35] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/16114

ChangeSet@1.2328, 2006-11-29 15:33:11+01:00, mskold@mysql.com +1 -0
  bug#24303  Wrong result for UPDATE IGNORE for NDB table: Refinement, only read all fields for UPDATE IGNORE with pk (check if UPDATE command and pk in write_set)
[30 Nov 2006 14:44] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/16220

ChangeSet@1.2331, 2006-11-30 15:44:30+01:00, mskold@mysql.com +1 -0
  bug#24303  Wrong result for UPDATE IGNORE for NDB table: bug fix reverted, fix for bug#18487  UPDATE IGNORE not supported for unique constraint violation of non-primary key, solves it a better way
[6 Dec 2006 10:44] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix for 5.0.32, 5.1.14.