diff options
Diffstat (limited to 'storage/innobase/buf/buf0dump.cc')
-rw-r--r-- | storage/innobase/buf/buf0dump.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc index bc39e6bfaec..b4b3dd75f30 100644 --- a/storage/innobase/buf/buf0dump.cc +++ b/storage/innobase/buf/buf0dump.cc @@ -315,11 +315,13 @@ buf_dump( n_pages * sizeof(*dump))); if (dump == NULL) { + std::ostringstream str_bytes; mysql_mutex_unlock(&buf_pool.mutex); fclose(f); + str_bytes << ib::bytes_iec{n_pages * sizeof(*dump)}; buf_dump_status(STATUS_ERR, - "Cannot allocate " ULINTPF " bytes: %s", - (ulint) (n_pages * sizeof(*dump)), + "Cannot allocate %s: %s", + str_bytes.str().c_str(), strerror(errno)); /* leave tmp_filename to exist */ return; @@ -561,11 +563,14 @@ buf_load() } if (dump == NULL) { + std::ostringstream str_bytes; fclose(f); - buf_load_status(STATUS_ERR, - "Cannot allocate " ULINTPF " bytes: %s", - dump_n * sizeof(*dump), + str_bytes << ib::bytes_iec{dump_n * sizeof(*dump)}; + buf_dump_status(STATUS_ERR, + "Cannot allocate %s: %s", + str_bytes.str().c_str(), strerror(errno)); + /* leave tmp_filename to exist */ return; } |