File tree Expand file tree Collapse file tree 6 files changed +23
-8
lines changed
mysql-test/suite/mariabackup Expand file tree Collapse file tree 6 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -1464,12 +1464,10 @@ bool backup_finish()
1464
1464
return (false );
1465
1465
}
1466
1466
1467
- if (!write_xtrabackup_info (mysql_connection)) {
1467
+ if (!write_xtrabackup_info (mysql_connection, XTRABACKUP_INFO, opt_history != 0 )) {
1468
1468
return (false );
1469
1469
}
1470
1470
1471
-
1472
-
1473
1471
return (true );
1474
1472
}
1475
1473
Original file line number Diff line number Diff line change @@ -1398,7 +1398,7 @@ PERCONA_SCHEMA.xtrabackup_history and writes a new history record to the
1398
1398
table containing all the history info particular to the just completed
1399
1399
backup. */
1400
1400
bool
1401
- write_xtrabackup_info (MYSQL *connection)
1401
+ write_xtrabackup_info (MYSQL *connection, const char * filename, bool history )
1402
1402
{
1403
1403
1404
1404
char *uuid = NULL ;
@@ -1426,7 +1426,7 @@ write_xtrabackup_info(MYSQL *connection)
1426
1426
|| xtrabackup_databases_exclude
1427
1427
);
1428
1428
1429
- backup_file_printf (XTRABACKUP_INFO ,
1429
+ backup_file_printf (filename ,
1430
1430
" uuid = %s\n "
1431
1431
" name = %s\n "
1432
1432
" tool_name = %s\n "
@@ -1463,7 +1463,7 @@ write_xtrabackup_info(MYSQL *connection)
1463
1463
xb_stream_name[xtrabackup_stream_fmt], /* format */
1464
1464
xtrabackup_compress ? " compressed" : " N" ); /* compressed */
1465
1465
1466
- if (!opt_history ) {
1466
+ if (!history ) {
1467
1467
goto cleanup;
1468
1468
}
1469
1469
Original file line number Diff line number Diff line change 68
68
write_binlog_info (MYSQL * connection );
69
69
70
70
bool
71
- write_xtrabackup_info (MYSQL * connection );
71
+ write_xtrabackup_info (MYSQL * connection , const char * filename , bool history );
72
72
73
73
bool
74
74
write_backup_config_file ();
Original file line number Diff line number Diff line change @@ -3513,7 +3513,13 @@ xtrabackup_backup_low()
3513
3513
" to '%s'.\n " , filename);
3514
3514
return false ;
3515
3515
}
3516
-
3516
+ sprintf (filename, " %s/%s" , xtrabackup_extra_lsndir,
3517
+ XTRABACKUP_INFO);
3518
+ if (!write_xtrabackup_info (mysql_connection, filename, false )) {
3519
+ msg (" mariabackup: Error: failed to write info "
3520
+ " to '%s'.\n " , filename);
3521
+ return false ;
3522
+ }
3517
3523
}
3518
3524
3519
3525
return true ;
Original file line number Diff line number Diff line change
1
+ xtrabackup_checkpoints
2
+ xtrabackup_info
Original file line number Diff line number Diff line change
1
+ let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
2
+ let $extra_lsndir=$MYSQLTEST_VARDIR/tmp/extra_lsndir;
3
+ mkdir $extra_lsndir;
4
+ --disable_result_log
5
+ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --extra-lsndir=$extra_lsndir;
6
+ --enable_result_log
7
+ list_files $extra_lsndir;
8
+ rmdir $extra_lsndir;
9
+ rmdir $targetdir;
You can’t perform that action at this time.
0 commit comments