Bug #30888 Innodb table + stored procedure + row deletion = server crash
Submitted: 7 Sep 2007 9:04 Modified: 19 Jun 2010 17:59
Reporter: Alexey Botchkov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.1.22 OS:Any
Assigned to: Sunny Bains CPU Architecture:Any

[7 Sep 2007 9:04] Alexey Botchkov
Description:
the #28430 bug was reopened as it's test case failed.
But it appeared that the new problem is not about PARTITION engine,
but about Innobase (can be reproduced on just InnoDB tables),
and was introduced with the last bit Tim's patch to the InnoDB.

So i decided to create a new entry for this issue.

How to repeat:
put the rpl_innodb_bug.test to the mysql-test/t
then execute in mysql-test:
./mysql-test-run.pl --mysqld='--innodb' rpl_innodb_bug

Suggested fix:
The assertion happens when slave handles Delete event.
Here is the patch that fixes the problem on my computer.

===== storage/innobase/row/row0sel.c 1.120 vs edited =====
*** /tmp/bk_row0sel.c-1.120_zkOVSy      2007-09-07 12:52:58 +05:00
--- edited/storage/innobase/row/row0sel.c       2007-09-07 12:50:24 +05:00
***************
*** 4587,4592 ****
--- 4587,4597 ----
                value = *(ib_uint32_t*) ptr;
                break;

+       case 3:
+               value = *(ib_uint32_t*) ptr;
+                 value&= 0xFFFFFF;
+               break;
+
        case 2:
                value = *(uint16 *) ptr;
                break;
[7 Sep 2007 9:07] Alexey Botchkov
test for the bug

Attachment: rpl_innodb_bug.test (application/octet-stream, text), 1.61 KiB.

[7 Sep 2007 17:32] Omer Barnir
while verifying hf's patch to this bug observed bug=30907 exposing an auto_inc problem with innodb partitioned tables (not related to the patch) when using --innodb_autoinc_lock_mode=0
[8 Sep 2007 15:11] Heikki Tuuri
Oops, I should have spotted this bug in Sunny's patch.

http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html

A MEDIUMINT is 3 bytes!

Assigning this bug for Sunny to fix.
[8 Sep 2007 16:09] Heikki Tuuri
Alexey's patch is correct, of course.
[5 Oct 2007 17:56] Bugs System
Pushed into 5.1.23-beta
[5 Oct 2007 18:09] Calvin Sun
the fix is already in 5.1.22 release.
[8 Oct 2007 16:23] Jon Stephens
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at

  http://www.mysql.com/downloads/

Closed without further action per comment from Calvin.
[21 Nov 2007 18:53] Bugs System
Pushed into 5.1.23-rc
[21 Nov 2007 18:53] Bugs System
Pushed into 6.0.4-alpha
[5 May 2010 15:27] 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 3:01] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug. Re-closing.
[28 May 2010 6:14] 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:42] 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 7:10] 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 22:44] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[17 Jun 2010 12:21] 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 13:09] 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:49] 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)