Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL), 10.4(EOL)
Description
When InnoDB creates an .ibd file, it first writes a dummy page 0 with no information about encryption. This may prevent Mariabackup 10.2.20 or 10.2.21 from copying encrypted data files that were craeted shortly before backup started.
Maybe we should create a 0-byte .ibd file first, and then let page flushing write the first pages? Alternatively, preallocate a zero-filled file and then let page flushing do its job.
A valid page 0 must be written to the created files before writing any other pages. Otherwise, crash recovery cannot work.
Attachments
Issue Links
- is duplicated by
-
MDEV-19348 MariaBackup prepare fails with InnoDB: Database page corruption on disk or a failed file read
-
- Closed
-
- relates to
-
MDEV-18129 Backup fails for encrypted tables: mariabackup: Database page corruption detected at page 1
-
- Closed
-
-
MDEV-18415 mariabackup.mdev-14447 test case fails with Table 'test.t' doesn't exist in engine
-
- Closed
-
-
MDEV-12112 corruption in encrypted table may be overlooked
-
- Closed
-
-
MDEV-14398 When innodb_encryption_rotate_key_age=0 is set, server won't encrypt tablespaces
-
- Closed
-
-
MDEV-15671 innodb.recovery_shutdown failed in buildbot with Checksum mismatch in datafile
-
- Closed
-
It looks like crash recovery is broken because of this. Here is a test that initializes the database and kills&restarts it soon after that. It can occasionally fail:
10.2 23e4446adc0de8b6f763f746fd20f0e546a40129
innodb.group_commit_crash_no_optimize_thread 'innodb' w3 [ fail ] Found warnings/errors in server log file!
Test ended at 2019-01-03 16:54:22
line
2019-01-03 16:54:21 3069097920 [ERROR] InnoDB: Checksum mismatch in datafile: ./ibdata1, Space ID:0, Flags: 0. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
^ Found warnings in /mnt/buildbot/build/mariadb-10.2.22/mysql-test/var/3/log/mysqld.1.err
Perhaps, in order to simplify things, we can keep the crash-unsafe creation of the InnoDB system tablespace that only happens when the database is initialized, and only fix the .ibd file creation. After all, I would at some point (MDEV-11633) make the InnoDB system tablespace optional (split its contents into more manageable pieces).