From 2a1b36740442d3fbc2d4b9023d18996f99a913f3 Mon Sep 17 00:00:00 2001 From: ParadoxV5 Date: Thu, 9 Jan 2025 17:54:57 -0700 Subject: [PATCH] MDEV-35429 my_snprintf fixes for 10.5+ * Innobase `os0file.cc`: use `PRIu64` over `llu` * These came after I prepared #3485. * MyISAM `mi_check.c`: in impossible block length warning * I missed this one in #3485 (and #3360 too?). --- storage/innobase/os/os0file.cc | 6 +++--- storage/myisam/mi_check.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 012f23b3b8dfd..c6106d47557b6 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -1641,8 +1641,8 @@ bool os_file_set_size(const char *name, os_file_t file, os_offset_t size, if (is_sparse) { bool success = !ftruncate(file, size); if (!success) { - sql_print_error("InnoDB: ftruncate of file %s" - " to %llu bytes failed with error %d", + sql_print_error("InnoDB: ftruncate of file %s to %" + PRIu64 " bytes failed with error %d", name, size, errno); } return success; @@ -1680,7 +1680,7 @@ bool os_file_set_size(const char *name, os_file_t file, os_offset_t size, case 0: return true; default: - sql_print_error("InnoDB: preallocating %llu" + sql_print_error("InnoDB: preallocating %" PRIu64 " bytes for file %s failed with error %d", size, name, err); /* fall through */ diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index e46dc35f86100..dff5fcdbcb6fb 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -3429,9 +3429,9 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param) { if (!searching) mi_check_print_info(param, - "Found block with impossible length %u at %s; Skipped", - block_info.block_len+ (uint) (block_info.filepos-pos), - llstr(pos,llbuff)); + "Found block with impossible length %lu at %s; Skipped", + block_info.block_len + (unsigned long) (block_info.filepos-pos), + llstr(pos, llbuff)); if (found_record) goto try_next; searching=1;