Skip to content

Commit

Permalink
MDEV-35818: Fix replace_binlog_file info message
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
ParadoxV5 committed Jan 11, 2025
1 parent 3e9da8c commit 9739478
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sql/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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, static_cast<unsigned long>(
m_cache_data->file_reserved_bytes()));
return false;
}

Expand Down

0 comments on commit 9739478

Please sign in to comment.