From e16066db2f227c7636c7cd0792b838ef9d6aedee Mon Sep 17 00:00:00 2001 From: ParadoxV5 Date: Fri, 10 Jan 2025 14:19:11 -0700 Subject: [PATCH] MDEV-35818: Fix `replace_binlog_file` info message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `ATTRIBUITE_FORMAT` from #3360 uncovers issues on `my_snprintf` uses. This commit fixes the one in `Binlog_commit_by_rotate::` `replace_binlog_file()` about “required size too big”. All I found is that it’s not present in 11.4 (after I prepared previous batches for all maintained branches), for GitHub blame can’t process a file with over 10K lines. --- sql/log.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sql/log.cc b/sql/log.cc index e3e944322f543..54b0766f6f493 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -13257,10 +13257,11 @@ bool Binlog_commit_by_rotate::replace_binlog_file() DBUG_EXECUTE_IF("simulate_required_size_too_big", required_size= 10000;); if (required_size > m_cache_data->file_reserved_bytes()) { - sql_print_information("Could not rename binlog cache to binlog(as " + sql_print_information("Could not rename binlog cache to binlog (as " "requested by --binlog-commit-by-rotate-threshold). " - "Required %llu bytes but only %llu bytes reserved.", - required_size, m_cache_data->file_reserved_bytes()); + "Required %zu bytes but only %lu bytes reserved.", + required_size, + (unsigned long) m_cache_data->file_reserved_bytes()); return false; }