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

MDEV-24317 Data race in LOGGER::init_error_log at sql/log.cc:1443 and in LOGGER::error_log_print at sql/log.cc:1181

don't initialize error_log_handler_list in set_handlers()
* error_log_handler_list is initialized to LOG_FILE early, in init_base()
* set_handlers always reinitializes it to LOG_FILE, so it's pointless
* after init_base() concurrent threads start using sql_log_warning,
  so following set_handlers() shouldn't modify error_log_handler_list
  without some protection
This commit is contained in:
Sergei Golubchik
2022-04-12 13:07:20 +02:00
parent 6891c4874a
commit bbdec04d59
4 changed files with 8 additions and 17 deletions

View File

@@ -1103,8 +1103,7 @@ public:
const char *query, size_t query_length);
/* we use this function to setup all enabled log event handlers */
int set_handlers(ulonglong error_log_printer,
ulonglong slow_log_printer,
int set_handlers(ulonglong slow_log_printer,
ulonglong general_log_printer);
void init_error_log(ulonglong error_log_printer);
void init_slow_log(ulonglong slow_log_printer);