Bug #28719 multi pk update ignore corrupts data
Submitted: 28 May 2007 9:18 Modified: 11 Jun 2007 20:20
Reporter: Tomas Ulin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: Tomas Ulin CPU Architecture:Any

[28 May 2007 9:18] Tomas Ulin
Description:
create table t1 (a int not null primary key, b int not null) engine=ndb;
create table t2 (c int not null primary key, d int not null) engine=ndb;
insert into t1 values (1,10), (2,10), (3,30), (4, 30);
insert into t2 values (1,10), (2,10), (3,30), (4, 30);
update t1 set b = 1 where a > 1 order by a desc limit 1;
update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3;
select * from t1 order by a;

master> select * from t1 order by a;
+---+----+
| a | b  |
+---+----+
| 1 | 10 | 
| 2 | 10 | 
| 3 |  1 | 
| 4 |  1 | 
+---+----+

should be:

master> select * from t1 order by a;
+---+----+
| a | b  |
+---+----+
| 1 | 10 | 
| 2 | 10 | 
| 3 | 30 | 
| 4 |  1 | 
+---+----+

How to repeat:
.
[28 May 2007 11:03] 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/27447

ChangeSet@1.2502, 2007-05-28 13:23:11+02:00, tomas@whalegate.ndb.mysql.com +3 -0
  Bug #28719: multi pk update ignore corrupts data
  - check multi update as well as update
  - this bug is not present in 5.0, but execution patch is wrong, so there are probably other bugs
[28 May 2007 11:53] 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/27456

ChangeSet@1.2515, 2007-05-28 14:13:42+02:00, tomas@whalegate.ndb.mysql.com +1 -0
  Bug #28719: multi pk update ignore corrupts data
  - 5.1 adoption
[11 Jun 2007 11:39] Bugs System
Pushed into 5.1.20-beta
[11 Jun 2007 11:42] Bugs System
Pushed into 5.0.44
[11 Jun 2007 20:20] 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 in 5.0.44 and 5.1.20 changelogs.
[3 Jul 2007 5:58] Jon Stephens
Also documented for telco-6.2.3.