summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2023-04-13 12:25:41 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2023-04-13 12:25:41 +0300
commitc0eeb72526bb4c6656d84b89ced33880ca1639d1 (patch)
treea149e1bb9e144abc5c4835a79c487833a6ec8ec7
parent2ddfb838078cb0f81b48ef878d97b966c8d9c494 (diff)
downloadmariadb-git-c0eeb72526bb4c6656d84b89ced33880ca1639d1.tar.gz
MDEV-28974 fixup: Fix error and warning messages
fil_name_process(): Starting with commit 212994f704496d01881f377e34e04bd007e5e298 the name is not guaranteed to be NUL terminated.
-rw-r--r--storage/innobase/log/log0recv.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc
index 8d05d6a5f14..3b6e3008a95 100644
--- a/storage/innobase/log/log0recv.cc
+++ b/storage/innobase/log/log0recv.cc
@@ -1307,7 +1307,8 @@ same_space:
} 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 @@ same_space:
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 @@ same_space:
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 @@ same_space:
}
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);
}
}
}