Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.11, 11.4
Description
As noted in MDEV-22721, the ib::logger classes and its subclasses cause a lot of code bloat. Some of it was addressed back then. One example, just observed in a recent 10.6 build, that there are hundreds of inline copies of the constructor ib::error::error().
The original motivation of implementing this bloat was to work around MDEV-21978 and the lack of an printf function attribute by avoiding the use of any printf style functions altogether. The C++ style operator<<() misuse translates into multiple function calls, which is extremely inefficient.
We should really replace most occurrences of ib::info(), ib::error(), and ib::warn() with direct calls to sql_print_information(), sql_print_error(), and sql_print_warning(). Where it is not possible (say, due to MDEV-27158), we’d better declare and define the constructors and destructors ATTRIBUTE_COLD ATTRIBUTE_NOINLINE, so that the code bloat will be reduced.
Attachments
Issue Links
- relates to
-
MDEV-21978 make my_vsnprintf to use gcc-compatible format extensions
- In Testing
-
MDEV-22721 Remove bloat caused by InnoDB logger class
- Closed
-
MDEV-27158 Humanize the number of bytes in InnoDB messages
- Closed