@@ -3233,35 +3233,24 @@ the first slot rollback segments of TRX_SYS_PAGE_NO.
3233
3233
@retval DB_SUCCESS if srv_undo_space_id assigned successfully. */
3234
3234
static dberr_t xb_assign_undo_space_start ()
3235
3235
{
3236
- ulint dirnamelen;
3237
- char name[1000 ];
3236
+
3238
3237
pfs_os_file_t file;
3239
3238
byte* buf;
3240
3239
byte* page;
3241
3240
bool ret;
3242
3241
dberr_t error = DB_SUCCESS;
3243
3242
ulint space, page_no;
3243
+ int n_retries = 5 ;
3244
3244
3245
3245
if (srv_undo_tablespaces == 0 ) {
3246
3246
return error;
3247
3247
}
3248
3248
3249
- os_normalize_path (srv_data_home);
3250
- dirnamelen = strlen (srv_data_home);
3251
- memcpy (name, srv_data_home, dirnamelen);
3252
-
3253
- if (dirnamelen && name[dirnamelen - 1 ] != OS_PATH_SEPARATOR) {
3254
- name[dirnamelen++] = OS_PATH_SEPARATOR;
3255
- }
3256
-
3257
- snprintf (name + dirnamelen, (sizeof name) - dirnamelen,
3258
- " %s" , srv_sys_space.first_datafile ()->name ());
3259
-
3260
- file = os_file_create (0 , name, OS_FILE_OPEN,
3261
- OS_FILE_NORMAL, OS_DATA_FILE, true , &ret);
3249
+ file = os_file_create (0 , srv_sys_space.first_datafile ()->filepath (),
3250
+ OS_FILE_OPEN, OS_FILE_NORMAL, OS_DATA_FILE, true , &ret);
3262
3251
3263
3252
if (!ret) {
3264
- msg (" mariabackup: Error in opening %s\n " , name );
3253
+ msg (" mariabackup: Error in opening %s\n " , srv_sys_space. first_datafile ()-> filepath () );
3265
3254
return DB_ERROR;
3266
3255
}
3267
3256
@@ -3278,7 +3267,14 @@ static dberr_t xb_assign_undo_space_start()
3278
3267
3279
3268
/* TRX_SYS page can't be compressed or encrypted. */
3280
3269
if (buf_page_is_corrupted (false , page, univ_page_size)) {
3281
- goto retry;
3270
+ if (n_retries--) {
3271
+ os_thread_sleep (1000 );
3272
+ goto retry;
3273
+ } else {
3274
+ msg (" mariabackup: TRX_SYS page corrupted.\n " );
3275
+ error = DB_ERROR;
3276
+ goto func_exit;
3277
+ }
3282
3278
}
3283
3279
3284
3280
/* 0th slot always points to system tablespace.
0 commit comments