Bug #20855 Crash recovery ignores MLOG_COMP_PAGE_REORGANIZE
Submitted: 4 Jul 2006 21:41 Modified: 18 Jun 2010 23:07
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:unreleased 5.2 OS:Any (all)
Assigned to: Marko Mäkelä CPU Architecture:Any

[4 Jul 2006 21:41] Marko Mäkelä
Description:
MySQL/InnoDB does not replay redo log entries of the type MLOG_COMP_PAGE_REORGANIZE, which are generated by the function btr_page_reorganize() when invoked on a B-tree page belonging to a ROW_FORMAT=COMPACT table.  All other redo log entry types should work
properly.

How to repeat:
The bug is hard to repeat outside a debugger, setting breakpoints and forcing crash recovery. In practice, crash recovery should be needed very seldomly and btr_page_reorganize() should be invoked very rarely in MySQL/InnoDB 5.0.

While it should be improbable for crash recovery to try to apply a redo log entry of the type MLOG_COMP_PAGE_REORGANIZE, users should be able to fully rely on InnoDB crash recovery.

Suggested fix:
Index: mtr/mtr0log.c
===================================================================
--- mtr/mtr0log.c	(revision 656)
+++ mtr/mtr0log.c	(working copy)
@@ -536,7 +536,7 @@ mlog_parse_index(
 		n_uniq = mach_read_from_2(ptr);
 		ptr += 2;
 		ut_ad(n_uniq <= n);
-		if (end_ptr < ptr + (n + 1) * 2) {
+		if (end_ptr < ptr + n * 2) {
 			return(NULL);
 		}
 	} else {
[4 Jul 2006 22:29] Marko Mäkelä
Sorry, false alarm. The bug does not exist in MySQL/InnoDB 5.0 or 5.1; it only exists in our 5.2 development tree. You can see that the context of the patch differs.
[5 May 2010 15:03] 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:16] Paul Dubois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug. Re-closing.
[28 May 2010 6:10] 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:38] 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:06] 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:22] Paul Dubois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[17 Jun 2010 12:15] 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:02] 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:43] 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)