Bug #24200 Provide backwards compatibility mode for 4.x "rollback on transaction timeout"
Submitted: 10 Nov 2006 19:01 Modified: 20 Jun 2010 17:22
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S4 (Feature request)
Version:5.0 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any
Tags: backport_050030SP1, bfsm_2006_12_07

[10 Nov 2006 19:01] Hartmut Holzgraefe
Description:
Starting with MySQL 5.0.13 InnoDB will only roll back 
the last query on transaction timeouts. In 4.x and up
to 5.0.12 it would abort and roll back the complete
transaction on timeouts as it still does on transaction
deadlocks.

How to repeat:
testcase to be added ...

Suggested fix:
Add a ini setting "innodb_rollback_on_timeout"
to optionally restore the old behavior
[10 Nov 2006 19:04] 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/15159

ChangeSet@1.2297, 2006-11-10 20:03:38+01:00, hartmut@mysql.com +5 -0
  Added innodb_rollback_on_timeout option to restore the 4.1 
  InnoDB timeout behavior (Bug #24200)
[13 Nov 2006 15:56] Heikki Tuuri
Osku,

can you add this also to the Innobase Oy official 5.0 source tree?

Regards,

Heikki
[19 Dec 2006 20:10] 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/17184

ChangeSet@1.2353, 2006-12-19 13:09:54-07:00, tsmith@siva.hindu.god +5 -0
  Added innodb_rollback_on_timeout option to restore the 4.1 
  InnoDB timeout behavior (Bug #24200)
[19 Dec 2006 23:58] 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/17189

ChangeSet@1.2353, 2006-12-19 16:57:51-07:00, tsmith@siva.hindu.god +13 -0
  Added innodb_rollback_on_timeout option to restore the 4.1 
  InnoDB timeout behavior (Bug #24200)
[21 Dec 2006 13:56] Joerg Bruehe
Patch is included in 5.0.32 and will be in 5.1.15.
[11 Jan 2007 13:15] Osku Salerma
Added to Innobase 5.0/5.1 trees.
[12 Jan 2007 14:01] Heikki Tuuri
Hi!

This should be noted in the 5.0.32 changlelog (and 5.0.33 if it is there). It is still missing from the 5.0 online manual.

Regards,

Heikki
[12 Jan 2007 20:29] Paul DuBois
Noted in 5.0.32, 5.0.33, 5.1.15 changelogs.

In MySQL 5.0.13 and up, InnoDB rolls back only the last statement on
a transaction timeout. A new option, --innodb_rollback_on_timeout,
causes InnoDB to abort and roll back the entire transaction if a
transaction timeout occurs (the same behavior as before MySQL
5.0.13).
[26 Feb 2007 9:17] dennismoore@dodgeit.com dennismoore@dodgeit.com
This shouldn't be an option, it should be the default.

The whole point of a transaction is that it is a group of statements that either all succeed, or all fail. Making this behaviour "optional" makes no sense.
[16 May 2007 14:39] Harrison Fisk
>This shouldn't be an option, it should be the default.

>The whole point of a transaction is that it is a group of statements that either
>all succeed, or all fail. Making this behaviour "optional" makes no sense.

This behavior only applies with innodb_lock_wait_timeout and has no affect based on other timeouts (such as wait_timeout, net_read_timeout, and so on).  

In the event of a row level lock timeout, it can be desirable to allow your application to decide what to do (such as ROLLBACK, retry the statement, etc...) so this behavior was added with an option for backwards compatibility if desired.
[5 May 2010 15:13] 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:32] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug. Re-closing.
[28 May 2010 5:55] 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:24] 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:52] 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)
[29 May 2010 23:29] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[17 Jun 2010 11:56] 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:35] 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:22] 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)