Problem
=======
- Mariabackup tool silently produce corrupted backups of
Aria tables. Identified three issues that prevents proper
detection of page corruption:
aria_read_data(), aria_read_index() does incorrect
CRC validation after doing CRC check, allows corrupted
pages to pass undetected.
aria_read_data(), aria_read_index() couldn't handle
zero filled pages. Based on the size of
aria_pagecache_buffer_size, pages could be
in cache when backup tries to read the data from file
maria_page_crc_check(): Prevents correctly identifying
and skipping zero-filled pages.
Solution:
========
This commit resolves these critical issues to ensure
the integrity of Aria table backups.
Corrected CRC check: Updated the code in aria_read_data() to
correctly check the return value from maria_page_crc_check(),
so any CRC mismatch will now properly fail the backup and
prevent corruption.
Improved zero-page handling: The aria_read_data() and
aria_read_index() functions are now robust enough to tolerate
and correctly process zero-filled pages.
The flawed conditional check in maria_page_crc_check() has
been corrected to reliably identify zero-filled pages.