[MDEV-28473] field_ref_zero is not initialized in xtrabackup_prepare_func() Created: 2022-05-04  Updated: 2022-09-14  Resolved: 2022-05-11

Status: Closed
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.5.12
Fix Version/s: 10.5.16, 10.6.8, 10.7.4, 10.8.3, 10.9.1

Type: Bug Priority: Major
Reporter: Vladislav Lesin Assignee: Vladislav Lesin
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Problem/Incident
causes MDEV-28832 infinite loop in mariabackup if log L... Closed
is caused by MDEV-26110 mtr failure innodb.innodb_scrub (asse... Closed
Relates
relates to MDEV-23515 Mariabackup --prepare crashed [ERROR]... Closed
relates to MDEV-22913 Error: xtrabackup_apply_delta() upon ... Closed
relates to MDEV-26983 Server crash in buf_is_zeroes or asse... Closed

 Description   

The bug is caused by 82d5994520c239da1b6edf1b24e08138ae0c753d(MDEV-26110), as field_ref_zero is initialized only for xtrabackup_backup_func(), but not for xtrabackup_prepare_func().

The bug can be repeated with the following change to an existing test:

diff --git a/mysql-test/suite/mariabackup/incremental_backup.test b/mysql-test/suite/mariabackup/incremental_backup.test
index 88e277fd95a..eb3f769f9a2 100644
--- a/mysql-test/suite/mariabackup/incremental_backup.test
+++ b/mysql-test/suite/mariabackup/incremental_backup.test
@@ -1,5 +1,5 @@
 --source include/have_aria.inc
---source include/innodb_page_size.inc
+--source include/innodb_page_size_small.inc
 
 # see suite.pm "check for exact values, in case the default changes to be small everywhere"
 if (`select @@max_binlog_stmt_cache_size = 4294963200 and @@innodb_page_size = 65536`) {
@@ -12,7 +12,7 @@ let basedir=$MYSQLTEST_VARDIR/tmp/backup;
 let incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
 
 CREATE TABLE t_aria(i INT) ENGINE ARIA;
-CREATE TABLE t(i INT PRIMARY KEY) ENGINE INNODB;
+CREATE TABLE t(i INT PRIMARY KEY) ENGINE INNODB ROW_FORMAT=COMPRESSED;
 BEGIN;
 INSERT INTO t VALUES(2);
 connect (con1,localhost,root,,);

The suggested fix is to move field_ref_zero allocation/deallocation from xtrabackup_backup_func() to it's caller main_low().



 Comments   
Comment by Vladislav Lesin [ 2022-05-06 ]

Pushed bb-10.5-MDEV-28473-field_ref_zero for testing.

Comment by Marko Mäkelä [ 2022-05-11 ]

Looks OK to me. Thank you!

Generated at Thu Feb 08 10:01:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.