Bug #29136 erred multi-delete on trans table does not rollback the statement

Submitted: 15 Jun 2007 10:21 Modified: 18 Jun 2010 1:07
Reporter: Andrei Elkin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.20, 5.1 OS:Any
Assigned to: Andrei Elkin CPU Architecture:Any

[15 Jun 2007 10:21] Andrei Elkin
Description:
This is similar to bug#27716 issue of lack of ::send_error() invokation in the case of an error.
An observed consequence is that multi-delete on trans table can perform partially.
Another side is in that there is no binlogging if the query has non-trans table modified side effect. 

How to repeat:
# prepare

CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
CREATE TABLE t1 (a int, PRIMARY KEY (a));

create trigger trg_del after  delete on t2 for each row
       insert into t1 values (1);

insert into t1 values (1);
insert into t2 values (1),(2);

# exec

delete t2 from t2; # ERROR 1062 (23000): Duplicate entry '1' for key 1

# check

select * from t2 /* must be (2) left */;

Suggested fix:
Similar to bug#27716.
[23 Jun 2007 13:37] 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/29450

ChangeSet@1.2522, 2007-06-23 16:33:39+03:00, aelkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi +7 -0
  Bug #29136 erred multi-delete on trans table does not rollback the statement
  
  similar to bug_27716, but it was stressed on in the synopsis on that there is another
  side of the artifact affecting behaviour in transaction.
  
  Fixed with deploying multi_delete::send_error() - otherwise never called - and refining its logic
  to perform binlogging job if needed.
  A small refinement for the related bug's fix
[9 Oct 2007 9: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/35185

ChangeSet@1.2541, 2007-10-09 12:44:02+03:00, aelkin@dsl-hkibras-fe2ef900-212.dhcp.inet.fi +9 -0
  Bug #29136 erred multi-delete on trans table does not rollback the statement
  
  similar to bug_27716, but it was stressed on in the synopsis on that there is another
  side of the artifact affecting behaviour in transaction.
  
  Fixed with deploying multi_delete::send_error() - otherwise never called - and refining its logic
  to perform binlogging job if needed.
  
  The changeset includes the following side effects:
  - added tests to check bug_23333's scenarios on the mixture of tables for multi_update;
  - fixes bug@30763 with two-liner patch and a test coinciding to one added for bug_23333.
[9 Oct 2007 12:15] 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/35193

ChangeSet@1.2541, 2007-10-09 15:15:30+03:00, aelkin@dsl-hkibras-fe2ef900-212.dhcp.inet.fi +10 -0
  Bug #29136 erred multi-delete on trans table does not rollback the statement
  
  similar to bug_27716, but it was stressed on in the synopsis on that there is another
  side of the artifact affecting behaviour in transaction.
  
  Fixed with deploying multi_delete::send_error() - otherwise never called - and refining its logic
  to perform binlogging job if needed.
  
  The changeset includes the following side effects:
  - added tests to check bug_23333's scenarios on the mixture of tables for multi_update;
  - fixes bug@30763 with two-liner patch and a test coinciding to one added for bug_23333.
[9 Oct 2007 12:20] 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/35194

ChangeSet@1.2541, 2007-10-09 15:19:53+03:00, aelkin@dsl-hkibras-fe2ef900-212.dhcp.inet.fi +10 -0
  Bug #29136 erred multi-delete on trans table does not rollback the statement
  
  similar to bug_27716, but it was stressed on in the synopsis on that there is another
  side of the artifact affecting behaviour in transaction.
  
  Fixed with deploying multi_delete::send_error() - otherwise never called - and refining its logic
  to perform binlogging job if needed.
  
  The changeset includes the following side effects:
  - added tests to check bug_23333's scenarios on the mixture of tables for multi_update;
  - fixes bug@30763 with two-liner patch and a test coinciding to one added for bug_23333.
[12 Oct 2007 14:19] Chuck Bell
Patch ok to push.
[13 Oct 2007 12:50] 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/35510

ChangeSet@1.2541, 2007-10-13 15:49:42+03:00, aelkin@koti.dsl.inet.fi +10 -0
  Bug #29136 erred multi-delete on trans table does not rollback the statement
  
  similar to bug_27716, but it was stressed on in the synopsis on that there is another
  side of the artifact affecting behaviour in transaction.
  
  Fixed with deploying multi_delete::send_error() - otherwise never called - and refining its logic
  to perform binlogging job if needed.
  
  The changeset includes the following side effects:
  - added tests to check bug_23333's scenarios on the mixture of tables for multi_update;
  - fixes bug@30763 with two-liner patch and a test coinciding to one added for bug_23333.
[27 Nov 2007 10:49] Bugs System
Pushed into 5.0.54
[27 Nov 2007 10:50] Bugs System
Pushed into 5.1.23-rc
[27 Nov 2007 10:53] Bugs System
Pushed into 6.0.4-alpha
[12 Dec 2007 19:39] Paul DuBois
Noted in 5.0.54, 5.1.23, 6.0.4 changelogs.

For transactional tables, an error during a multiple-table DELETE
statement did not roll back the statement.
[5 May 2010 15:10] Bugs System
Pushed into 5.1.47 (revid:joro@sun.com-20100505145753-ivlt4hclbrjy8eye) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[6 May 2010 2:58] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug. Re-closing.
[28 May 2010 5:48] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:17] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 6:45] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 21:42] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[17 Jun 2010 11:48] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:26] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:13] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.