mariadb/extra/mariabackup
Marko Mäkelä 6b6fa3cdb1 MDEV-18644: Support full_crc32 for page_compressed
This is a follow-up task to MDEV-12026, which introduced
innodb_checksum_algorithm=full_crc32 and a simpler page format.
MDEV-12026 did not enable full_crc32 for page_compressed tables,
which we will be doing now.

This is joint work with Thirunarayanan Balathandayuthapani.

For innodb_checksum_algorithm=full_crc32 we change the
page_compressed format as follows:

FIL_PAGE_TYPE: The most significant bit will be set to indicate
page_compressed format. The least significant bits will contain
the compressed page size, rounded up to a multiple of 256 bytes.

The checksum will be stored in the last 4 bytes of the page
(whether it is the full page or a page_compressed page whose
size is determined by FIL_PAGE_TYPE), covering all preceding
bytes of the page. If encryption is used, then the page will
be encrypted between compression and computing the checksum.
For page_compressed, FIL_PAGE_LSN will not be repeated at
the end of the page.

FSP_SPACE_FLAGS (already implemented as part of MDEV-12026):
We will store the innodb_compression_algorithm that may be used
to compress pages. Previously, the choice of algorithm was written
to each compressed data page separately, and one would be unable
to know in advance which compression algorithm(s) are used.

fil_space_t::full_crc32_page_compressed_len(): Determine if the
page_compressed algorithm of the tablespace needs to know the
exact length of the compressed data. If yes, we will reserve and
write an extra byte for this right before the checksum.

buf_page_is_compressed(): Determine if a page uses page_compressed
(in any innodb_checksum_algorithm).

fil_page_decompress(): Pass also fil_space_t::flags so that the
format can be determined.

buf_page_is_zeroes(): Check if a page is full of zero bytes.

buf_page_full_crc32_is_corrupted(): Renamed from
buf_encrypted_full_crc32_page_is_corrupted(). For full_crc32,
we always simply validate the checksum to the page contents,
while the physical page size is explicitly specified by an
unencrypted part of the page header.

buf_page_full_crc32_size(): Determine the size of a full_crc32 page.

buf_dblwr_check_page_lsn(): Make this a debug-only function, because
it involves potentially costly lookups of fil_space_t.

create_table_info_t::check_table_options(),
ha_innobase::check_if_supported_inplace_alter(): Do allow the creation
of SPATIAL INDEX with full_crc32 also when page_compressed is used.

commit_cache_norebuild(): Preserve the compression algorithm when
updating the page_compression_level.

dict_tf_to_fsp_flags(): Set the flags for page compression algorithm.
FIXME: Maybe there should be a table option page_compression_algorithm
and a session variable to back it?
2019-03-18 14:08:43 +02:00
..
crc Merge 10.2 into 10.3 2018-11-06 09:40:39 +02:00
quicklz MDEV-9566 Add Percona Xtrabackup 2.3.7 2017-04-27 19:12:39 +02:00
backup_copy.cc Merge 10.2 into 10.3 2019-03-06 16:20:13 +02:00
backup_copy.h MDEV-13575 On failure, Mariabackup --backup --safe-slave-backup may forget to START SLAVE SQL_THREAD 2017-08-18 21:42:33 +03:00
backup_mysql.cc Merge 10.3 into 10.4 2019-03-08 22:11:37 +02:00
backup_mysql.h MDEV-15071 backup does not store xtrabackup_info in the --extra-lsndir directory 2018-02-15 21:08:18 +00:00
backup_wsrep.h Fix compilation in mariabackup 2017-09-16 22:19:16 +02:00
changed_page_bitmap.cc Merge 10.2 into 10.3 2019-01-17 12:38:46 +02:00
changed_page_bitmap.h MDEV-9566 Add Percona Xtrabackup 2.3.7 2017-04-27 19:12:39 +02:00
CMakeLists.txt Galera4 2019-01-23 15:30:00 +04:00
common.h mariabackup : use die() macro for fatal exit with error message. 2019-01-16 08:39:49 +01:00
datasink.cc Merge 10.2 into 10.3 2019-01-17 12:38:46 +02:00
datasink.h MDEV-13023 mariabackup does not preserve holes for page compressed tables. 2018-03-23 15:30:01 +00:00
ds_archive.cc Merge 10.2 into 10.3 2019-01-17 12:38:46 +02:00
ds_archive.h MDEV-9566 Add Percona Xtrabackup 2.3.7 2017-04-27 19:12:39 +02:00
ds_buffer.cc Merge 10.2 into 10.3 2019-01-17 12:38:46 +02:00
ds_buffer.h MDEV-9566 Add Percona Xtrabackup 2.3.7 2017-04-27 19:12:39 +02:00
ds_compress.cc Merge 10.2 into 10.3 2019-01-17 12:38:46 +02:00
ds_compress.h MDEV-9566 Add Percona Xtrabackup 2.3.7 2017-04-27 19:12:39 +02:00
ds_local.cc MDEV-18644: Support full_crc32 for page_compressed 2019-03-18 14:08:43 +02:00
ds_local.h MDEV-13023 mariabackup does not preserve holes for page compressed tables. 2018-03-23 15:30:01 +00:00
ds_stdout.cc Merge 10.2 into 10.3 2019-01-17 12:38:46 +02:00
ds_stdout.h MDEV-9566 Add Percona Xtrabackup 2.3.7 2017-04-27 19:12:39 +02:00
ds_tmpfile.cc Merge 10.2 into 10.3 2019-01-17 12:38:46 +02:00
ds_tmpfile.h MDEV-9566 Add Percona Xtrabackup 2.3.7 2017-04-27 19:12:39 +02:00
ds_xbstream.cc Merge 10.2 into 10.3 2019-01-17 12:38:46 +02:00
ds_xbstream.h MDEV-9566 Add Percona Xtrabackup 2.3.7 2017-04-27 19:12:39 +02:00
encryption_plugin.cc Merge 10.2 into 10.3 2019-03-06 16:20:13 +02:00
encryption_plugin.h MDEV-9566 Port Percona Xtrabackup to MariaDB as mariabackup 2017-04-27 19:12:40 +02:00
fil_cur.cc MDEV-18644: Support full_crc32 for page_compressed 2019-03-18 14:08:43 +02:00
fil_cur.h MDEV-18493 Remove page_size_t 2019-02-07 12:21:35 +02:00
innobackupex.cc MDEV-18212 mariabackup: Make output format uniform whenever possible 2019-01-15 14:15:04 +01:00
innobackupex.h MDEV-9566 Add Percona Xtrabackup 2.3.7 2017-04-27 19:12:39 +02:00
read_filt.cc MDEV-18493 Remove page_size_t 2019-02-07 12:21:35 +02:00
read_filt.h MDEV-18493 Remove page_size_t 2019-02-07 12:21:35 +02:00
write_filt.cc MDEV-18493 Remove page_size_t 2019-02-07 12:21:35 +02:00
write_filt.h MDEV-14077 Incremental backup extremly slow 2017-11-09 19:07:05 +00:00
wsrep.cc Merge 10.2 into 10.3 2019-01-17 12:38:46 +02:00
xb_regex.h MDEV-9566 Port Percona Xtrabackup to MariaDB as mariabackup 2017-04-27 19:12:40 +02:00
xbcloud.cc After-merge fix for commit 98eb9518db 2018-03-16 15:49:53 +02:00
xbstream.cc Merge 10.2 into 10.3 2019-01-17 12:38:46 +02:00
xbstream.h MDEV-18212 mariabackup: Make output format uniform whenever possible 2019-01-15 14:15:04 +01:00
xbstream_read.cc Merge 10.2 into 10.3 2019-01-17 12:38:46 +02:00
xbstream_write.cc Merge 10.2 into 10.3 2019-01-17 12:38:46 +02:00
xtrabackup.cc Merge 10.3 into 10.4 2019-03-08 22:11:37 +02:00
xtrabackup.h MDEV-18493 Remove page_size_t 2019-02-07 12:21:35 +02:00