1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Reënable ATTRIBUTE_FORMAT on DBUG_PRINT & t/eprint

(Re)ënable the `ATTRIBUTE_FORMAT` on `my_dbug.h`’s `_db_doprnt_`
(better known by its frontend `DBUG_PRINT`) and `ma_recovery_util.h`’s
`tprint` & `eprint` to leverage GCC `-Wformat` checking

c4bf4b7aef introduced `WAITING_FOR_BUGFIX_TO_VSPRINTF` to conditionally
(read: temporarily) disable their `ATTRIBUTE_FORMAT`s.
Whatever that bug was aside, MDEV-21978 Zulip suggested that the
preference for `%b` was probably intended, although c52e62a76f
reverted the one in `storage/maria/ma_recovery.c` back to `%s`.

All extension migrations (e.g., `%b` ➡ `%sB`)
in this commit were on `DBUG_PRINT`.
This commit is contained in:
ParadoxV5
2024-08-05 14:39:09 -06:00
committed by Sergei Golubchik
parent d5ba6f71b9
commit 21dfef474c
5 changed files with 7 additions and 15 deletions

View File

@@ -3177,7 +3177,7 @@ Rows_log_event::Rows_log_event(const uchar *buf, uint event_len,
uchar *ptr_after_width= (uchar*) ptr_width;
DBUG_PRINT("debug", ("Reading from %p", ptr_after_width));
m_width= net_field_length(&ptr_after_width);
DBUG_PRINT("debug", ("m_width=%lu", m_width));
DBUG_PRINT("debug", ("m_width=%u", m_width));
/* Avoid reading out of buffer */
if (ptr_after_width + (m_width + 7) / 8 > (uchar*)buf + event_len)
@@ -3240,7 +3240,7 @@ Rows_log_event::Rows_log_event(const uchar *buf, uint event_len,
DBUG_VOID_RETURN;
}
size_t const data_size= event_len - read_size;
DBUG_PRINT("info",("m_table_id: %llu m_flags: %d m_width: %lu data_size: %lu",
DBUG_PRINT("info",("m_table_id: %llu m_flags: %d m_width: %u data_size: %lu",
m_table_id, m_flags, m_width, (ulong) data_size));
m_rows_buf= (uchar*) my_malloc(PSI_INSTRUMENT_ME, data_size, MYF(MY_WME));