Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
Q1/2026 Server Development
Description
The logic of THD::decide_logging_format() can be simplified (and these patterns can be used to clean-up other code as well).
- Checks for whether or not binary logging is enabled server-wide are not consistent. Usually mysql_bin_log.is_open() is used, but there are other checks used elsewhere in the codebase inconsistently (e.g. wsrep_emulate_bin_log). This should be made into an inline function, and used everywhere so the checks are consistent.
- There are cases when binlogging is dynamically decided to not be used (e.g. if an error is detected). There is no set convention when this happens, which complicates further checks/assertions. As a general policy, binlog_format can be set to BINLOG_FORMAT_UNSPEC to indicate that binary logging should be disabled for the current transaction.
- THD::decide_logging_format should be skipped when binary logging is disabled.
- WSREP only works when binlog_format=BINLOG_FORMAT_ROW. Various pieces of logic can be simplified because of this (e.g. wsrep_forced_binlog_format, wsrep_binlog_format()).
Attachments
Issue Links
- relates to
-
MDEV-35915 Implement Global temporary tables
-
- Stalled
-