Bug #69477 | InnoDB: Use of large externally-stored fields makes crash recovery lose data | ||
---|---|---|---|
Submitted: | 14 Jun 2013 19:06 | Modified: | 26 May 2014 14:52 |
Reporter: | Jeremy Cole (Basic Quality Contributor) (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | All | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | BLOB, crash, external, innodb, redo |
[14 Jun 2013 19:06]
Jeremy Cole
[14 Jun 2013 19:06]
Jeremy Cole
Test case to demonstrate problem
Attachment: innodb_blob_unrecoverable_crash.test (application/octet-stream, text), 1.54 KiB.
[14 Jun 2013 19:56]
MySQL Verification Team
Thank you for the bug report.
[26 May 2014 14:52]
Daniel Price
Fixed as of 5.6.20, 5.7.5, and here's the changelog entry: Redo log writes for large, externally stored "BLOB" fields could overwrite the most recent checkpoint. The 5.6.20 patch limits the size of redo log "BLOB" writes to 10% of the redo log file size. The 5.7.5 patch addresses the bug without imposing a limitation. For MySQL 5.5, the bug remains a known limitation. The limitation has also been documented in the reference manual. The changes should appear soon, with the next published documentation build. http://dev.mysql.com/doc/refman/5.1/en/innodb-restrictions.html http://dev.mysql.com/doc/refman/5.5/en/innodb-restrictions.html Thank you for the bug report.
[15 Jul 2014 15:08]
Daniel Price
The changelog entry for this bug has been revised: Fixed as of the upcoming 5.6.20, 5.7.5 release, and here's the changelog entry: Redo log writes for large, externally stored "BLOB" fields could overwrite the most recent checkpoint. The 5.6.20 patch limits the size of redo log "BLOB" writes to 10% of the redo log file size. The 5.7.5 patch addresses the bug without imposing a limitation. For MySQL 5.5, the bug remains a known limitation. As a result of the redo log "BLOB" write limit introduced for MySQL 5.6, "innodb_log_file_size" should be set to a value greater than 10 times the largest "BLOB" data size found in the rows of your tables. Failing to do so could result in "Row size too large" errors. No action is required if your "innodb_log_file_size" setting is already 10 times the largest "BLOB" data size or your tables contain no "BLOB" data. Thank you for the bug report.
[7 Aug 2014 5:10]
Laurynas Biveinis
$ bzr log -n0 -r 5958 ------------------------------------------------------------ revno: 5958 committer: Annamalai Gurusami <annamalai.gurusami@oracle.com> branch nick: mysql-5.6 timestamp: Thu 2014-05-22 21:23:03 +0530 message: Bug #16963396 INNODB: USE OF LARGE EXTERNALLY-STORED FIELDS MAKES CRASH RECOVERY LOSE DATA Problem: When too-large blob fields are used, InnoDB overwrites its most recent checkpoint in its redo logs. Solution: Ensure that the total blob length does not exceed 10% of the redo log file size. rb#5399 approved by Marko, Nuno, Manish. Venkat also contributed to patch (in replication related test case).
[19 Sep 2014 17:06]
Daniel Price
Posted by developer: Please Note: In MySQL 5.6.22, the redo log BLOB write limit is relaxed. The changelog entry for this bug has been revised to state the following: Redo log writes for large, externally stored "BLOB" fields could overwrite the most recent checkpoint. The 5.6.20 patch limits the size of redo log "BLOB" writes to 10% of the redo log file size. The 5.7.5 patch addresses the bug without imposing a limitation. For MySQL 5.5, the bug remains a known limitation. As a result of the redo log "BLOB" write limit introduced for MySQL 5.6, the "innodb_log_file_size" setting should be 10 times larger than the largest "BLOB" data size found in the rows of your tables plus the length of other variable length fields ("VARCHAR", "VARBINARY", and "TEXT" type fields). No action is required if your "innodb_log_file_size" setting is already sufficiently large or your tables contain no "BLOB" data. In MySQL 5.6.22, the redo log "BLOB" write limit is relaxed to 10% of the "total redo log size" ("innodb_log_file_size" * "innodb_log_files_in_group").