-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-31273: Replace Log_event::writer with function parameter
This is a preparatory patch for precomputing binlog checksums outside of holding LOCK_log, no functional changes. Replace Log_event::writer with just passing the writer object as a function parameter to Log_event::write(). This is mainly for code clarity. Having to set ev->writer before every call to ev->write() is error-prone (what if it's forgotten in some code place?), while passing it as parameter as usual makes it explicit how the dataflow is. As a minor point, it also improves the code, as the compiler now can save the function parameter in a register across nested calls (when it is a class member, compiler needs to reload across nested calls in case the object would be modified during the call). Reviewed-by: Monty <monty@mariadb.org> Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
- Loading branch information
Showing
2 changed files
with
155 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.