mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
MDEV-41166 --backup --innodb-log-checkpoint-now may copy too much
xtrabackup_backup_func(): Request for a checkpoint synchronously so that recv_sys.find_checkpoint() will observe the effect. Reviewed by: Thirunarayanan Balathandayuthapani
This commit is contained in:
@@ -5590,13 +5590,14 @@ static bool xtrabackup_backup_func()
|
||||
msg("cd to %s", mysql_real_data_home);
|
||||
encryption_plugin_backup_init(mysql_connection);
|
||||
if (innodb_log_checkpoint_now) {
|
||||
msg("Initiating checkpoint");
|
||||
if (mysql_send_query(mysql_connection,
|
||||
C_STRING_WITH_LEN("SET GLOBAL "
|
||||
"innodb_log_checkpoint_now=ON;"))) {
|
||||
msg("initiating checkpoint failed");
|
||||
return(false);
|
||||
}
|
||||
/* This had better finish before recv_sys.find_checkpoint()
|
||||
starts executing below. The command may not be recognised
|
||||
by an old server; we can ignore a failure to execute this
|
||||
performance tweak. */
|
||||
xb_mysql_query(
|
||||
mysql_connection,
|
||||
"SET GLOBAL innodb_log_checkpoint_now=ON;",
|
||||
false, false);
|
||||
}
|
||||
|
||||
msg("open files limit requested %lu, set to %lu",
|
||||
@@ -5707,13 +5708,6 @@ fail:
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* try to wait for a log checkpoint, but do not fail if the
|
||||
server does not support this */
|
||||
if (innodb_log_checkpoint_now != false) {
|
||||
mysql_read_query_result(mysql_connection);
|
||||
msg("Finished waiting for checkpoint");
|
||||
}
|
||||
|
||||
if (!select_history()) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user