File tree Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -4246,16 +4246,11 @@ xtrabackup_init_temp_log(void)
42464246
42474247ib_int64_t file_size;
42484248
4249- lsn_t max_no;
4250- lsn_t max_lsn;
4251- lsn_t checkpoint_no;
4249+ lsn_t max_no = 0 ;
4250+ lsn_t max_lsn = 0 ;
42524251
42534252ulint fold;
42544253
4255- bool checkpoint_found;
4256-
4257- max_no = 0 ;
4258-
42594254if (!log_buf) {
42604255goto error;
42614256}
@@ -4354,35 +4349,29 @@ xtrabackup_init_temp_log(void)
43544349// ' ', 4);
43554350}
43564351
4357- checkpoint_found = false ;
4358-
43594352/* read last checkpoint lsn */
43604353for (field = LOG_CHECKPOINT_1; field <= LOG_CHECKPOINT_2;
43614354field += LOG_CHECKPOINT_2 - LOG_CHECKPOINT_1) {
43624355if (!recv_check_cp_is_consistent (const_cast <const byte *>
43634356 (log_buf + field)))
4364- goto not_consistent ;
4357+ continue ;
43654358
4366- checkpoint_no = mach_read_from_8 (log_buf + field +
4367- LOG_CHECKPOINT_NO);
4359+ lsn_t checkpoint_no = mach_read_from_8 (log_buf + field +
4360+ LOG_CHECKPOINT_NO);
43684361
43694362if (checkpoint_no >= max_no) {
43704363
43714364max_no = checkpoint_no;
43724365max_lsn = mach_read_from_8 (log_buf + field +
43734366 LOG_CHECKPOINT_LSN);
4374- checkpoint_found = true ;
43754367}
4376- not_consistent:
4377- ;
43784368}
43794369
4380- if (!checkpoint_found ) {
4370+ if (!max_lsn ) {
43814371msg (" mariabackup: No valid checkpoint found.\n " );
43824372goto error;
43834373}
43844374
4385-
43864375/* It seems to be needed to overwrite the both checkpoint area. */
43874376mach_write_to_8 (log_buf + LOG_CHECKPOINT_1 + LOG_CHECKPOINT_LSN,
43884377max_lsn);
You can’t perform that action at this time.
0 commit comments