Commit c0eeb725 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-28974 fixup: Fix error and warning messages

fil_name_process(): Starting with
commit 212994f7
the name is not guaranteed to be NUL terminated.
parent 2ddfb838
......@@ -1307,7 +1307,8 @@ static void fil_name_process(const char *name, ulint len, uint32_t space_id,
} else {
ib::error() << "Tablespace " << space_id
<< " has been found in two places: '"
<< f.name << "' and '" << name << "'."
<< f.name << "' and '"
<< fname.name << "'."
" You must delete one of them.";
recv_sys.set_corrupt_fs();
}
......@@ -1333,7 +1334,8 @@ static void fil_name_process(const char *name, ulint len, uint32_t space_id,
ib::info()
<< "At LSN: " << recv_sys.recovered_lsn
<< ": unable to open file " << name
<< ": unable to open file "
<< fname.name
<< " for tablespace " << space_id;
}
break;
......@@ -1350,8 +1352,9 @@ static void fil_name_process(const char *name, ulint len, uint32_t space_id,
ut_ad(space == NULL);
if (srv_force_recovery == 0) {
sql_print_error("InnoDB: Recovery cannot access"
" file %s (tablespace "
UINT32PF ")", name, space_id);
" file %.*s (tablespace "
UINT32PF ")", int(len), name,
space_id);
sql_print_information("InnoDB: You may set "
"innodb_force_recovery=1"
" to ignore this and"
......@@ -1362,9 +1365,10 @@ static void fil_name_process(const char *name, ulint len, uint32_t space_id,
}
sql_print_warning("InnoDB: Ignoring changes to"
" file %s (tablespace " UINT32PF ")"
" file %.*s (tablespace "
UINT32PF ")"
" due to innodb_force_recovery",
name, space_id);
int(len), name, space_id);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment