Bug #32954 Online Backup: MyISAM default driver misses rows in release build
Submitted: 4 Dec 2007 11:29 Modified: 26 Feb 2008 1:36
Reporter: Lars Thalmann Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:6.0 OS:Any
Assigned to: Chuck Bell CPU Architecture:Any

[4 Dec 2007 11:29] Lars Thalmann
Description:
Repeated backups leads to lost rows using default driver for MyISAM.

How to repeat:
--source include/have_innodb.inc
--source include/not_embedded.inc

connect (backup,localhost,root,,);
connect (restore,localhost,root,,);

connection backup;

USE test;

DELETE FROM mysql.online_backup;
DELETE FROM mysql.online_backup_progress;

--disable_query_log
CREATE TABLE `building` (
  `dir_code` char(4)
)ENGINE=INNODB;
--enable_query_log

INSERT INTO `building` VALUES ('N41');

--replace_column 1 #
BACKUP DATABASE test TO 'test.ba';
SELECT total_bytes FROM mysql.online_backup;

DROP DATABASE test;

connection restore;

DELETE FROM mysql.online_backup;
DELETE FROM mysql.online_backup_progress;

--replace_column 1 #
RESTORE FROM 'test.ba';
SELECT total_bytes FROM mysql.online_backup;

USE test;

# Wait for rows to be written to table.
let $wait_condition = SELECT count(*) = 1
                      FROM test.building;
--source include/wait_condition.inc

SELECT * FROM building;

DROP TABLE IF EXISTS building;
[13 Dec 2007 16:33] Chuck Bell
Cannot reproduce error in test. Submitted patch to change backup.test to use MyISAM (as before when error occurred). I will monitor PB for the results.
[15 Dec 2007 0:40] Chuck Bell
Problem identified: The problem occurs on restore. The MyISAM records are being unpacked correctly but the record contains some invalid data. This invalid data is related to the defaults data settings. To solve the problem, a call to restore_record() must be made prior to unpacking the row data from the buffer.
[15 Dec 2007 0:47] Chuck Bell
Patch ready for review. See http://lists.mysql.com/commits/40046.
[15 Dec 2007 10:05] Rafal Somla
Good to push.
[25 Feb 2008 20:19] Bugs System
Pushed into 6.0.5-alpha
[26 Feb 2008 1:36] Paul DuBois
Noted in 6.0.5 changelog.

The MyISAM driver for Online Backup could incorrectly restore data.
[14 Mar 2008 1:31] Paul DuBois
Correction: No changelog entry needed; this bug did not appear in any released version.