Skip to content

Commit

Permalink
Merge pull request #1498 from altmannmarcelo/PXB-3147-8.0
Browse files Browse the repository at this point in the history
8.0 Fix PXB-3147: Xtrabackup failed to execute query 'DO innodb_redo_log_…
  • Loading branch information
altmannmarcelo authored Oct 10, 2023
2 parents 40c6543 + dc56028 commit 4f3a8eb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions storage/innobase/xtrabackup/src/redo_log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,10 @@ bool Redo_Log_Data_Manager::init() {
xtrabackup_register_redo_log_consumer = false;
return (false);
}
/* Consumer queries might not work on some sql_mode.
* Forcing it to be empty.
*/
xb_mysql_query(redo_log_consumer_cnx, "SET sql_mode=''", false, true);
redo_log_consumer.init(redo_log_consumer_cnx);
redo_log_consumer_can_advance.store(true);
}
Expand Down
10 changes: 10 additions & 0 deletions storage/innobase/xtrabackup/test/t/redo_log_consumer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,13 @@ kill -SIGCONT $xb_pid
run_cmd wait $job_pid

xtrabackup --prepare --target-dir=$topdir/backup

# PXB-3147 - register redo log consumer fails with ANSI_QUOTES
stop_server

MYSQLD_EXTRA_MY_CNF_OPTS="
sql_mode = 'ANSI_QUOTES'
"

start_server
xtrabackup --backup --stream --register-redo-log-consumer > /dev/null

0 comments on commit 4f3a8eb

Please sign in to comment.