Bug #40224 New AUTOINC changes mask reporting of deadlock/timeout errors

Submitted: 21 Oct 2008 23:44 Modified: 18 Jun 2010 23:06
Reporter: Sunny Bains Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.1.22+ and plugin OS:Any
Assigned to: Sunny Bains CPU Architecture:Any
Tags: autoinc

[21 Oct 2008 23:44] Sunny Bains
Description:
This error is relevant only when: autoinc_lock_mode = TRADITIONAL

In the pre 5.1.22 versions, errors related to the AUTOINC locking were returned by ha_innobase::write_row(). With the new code they are not, an example:

  If the special AUTOINC lock caused a deadlock (pre 5.1.22) then that error would be reported to the user as a deadlock error. However, with the new code this error is reported as a generic AUTOINC failure error.

How to repeat:
set autoinc_lock_mode = TRADITIONAL and run lots of concurrent threads inserting rows. Instead of DEADLOCK/TIMEOUT errors you will see AUTOINC failure errors.

Suggested fix:
Return the actual AUTOINC lock related error code from ha_innobase::write_row().
[23 Oct 2008 9:30] 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/56868

2739 He Zhenxing	2008-10-23
      BUG#40224 Optimized build of mysqld crashes when built with Sun Studio on SPARC
      
      Fix a segmental fault problem caused by unaligned memory when 
      built with optimization on SPARC 64
[23 Oct 2008 10: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/56873

2739 He Zhenxing	2008-10-23
      BUG#40224 Optimized build of mysqld crashes when built with Sun Studio on SPARC
      
      Fix a segmental fault problem caused by unaligned memory when 
      built with optimization on SPARC 64
[23 Oct 2008 12:52] 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/56890

2739 He Zhenxing	2008-10-23
      BUG#40224 Optimized build of mysqld crashes when built with Sun Studio on SPARC
            
      Fix a segmental fault problem caused by unaligned memory when 
      built with optimization on SPARC 64
[24 Oct 2008 7: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/56966

2740 He Zhenxing	2008-10-24
      fix previous patch for BUG#40224
      
      There is one 'int' not changed to 'long'.
[24 Oct 2008 7:09] Sunny Bains
What's with the previous comments by He Zhenxing ? What's going on here ? I can't figure out what they have to do with the bug report.
[28 Oct 2008 8:09] Bugs System
Pushed into 6.0.8-alpha  (revid:hezx@mysql.com-20081024070330-zvhsk3pt42ki2c2n) (version source revid:alik@mysql.com-20081028074606-nzkci70shxkah009) (pib:5)
[24 Feb 2009 1:38] Paul DuBois
Noted in 6.0.8 changelog.

With innodb_autoinc_lock_mode set to 0 ("traditional" locking),
deadlock and lock-wait timeout errors encountered while reading
AUTO_INCREMENT values were being reported as a generic AUTO_INCREMENT
value allocation failure. (The actual error encountered was printed
in the error log.) The transaction was being rolled back but all the 
user saw was an AUTO_INCREMENT failure code. Now the actual locking
error code is returned to the user.
[5 May 2010 15:01] 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 16:52] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[28 May 2010 5:59] 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:27] 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:55] 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 15:21] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[15 Jun 2010 8:07] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100615080459-smuswd9ooeywcxuc) (version source revid:mmakela@bk-internal.mysql.com-20100415070122-1nxji8ym4mao13ao) (merge vers: 5.1.47) (pib:16)
[15 Jun 2010 8:23] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100615080558-cw01bzdqr1bdmmec) (version source revid:mmakela@bk-internal.mysql.com-20100415070122-1nxji8ym4mao13ao) (pib:16)
[17 Jun 2010 12:02] 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:43] 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:29] 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.080 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.