summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-04-12 13:07:20 +0200
committerSergei Golubchik <serg@mariadb.org>2022-04-12 13:07:20 +0200
commitbbdec04d59ceeda7d1792c8250f6b10989cb239a (patch)
treebd7d971804d31de965679d9c1d4e723d027f4ea6 /sql/log.cc
parent6891c4874a70685e6f6661fad2369d26007003c7 (diff)
downloadmariadb-git-bbdec04d59ceeda7d1792c8250f6b10989cb239a.tar.gz
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
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 61cc922adb9..f6f3879e66d 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1561,13 +1561,9 @@ bool Log_to_csv_event_handler::init()
return 0;
}
-int LOGGER::set_handlers(ulonglong error_log_printer,
- ulonglong slow_log_printer,
+int LOGGER::set_handlers(ulonglong slow_log_printer,
ulonglong general_log_printer)
{
- /* error log table is not supported yet */
- DBUG_ASSERT(error_log_printer < LOG_TABLE);
-
lock_exclusive();
if ((slow_log_printer & LOG_TABLE || general_log_printer & LOG_TABLE) &&
@@ -1580,7 +1576,6 @@ int LOGGER::set_handlers(ulonglong error_log_printer,
"Falling back to the old-fashioned logs");
}
- init_error_log(error_log_printer);
init_slow_log(slow_log_printer);
init_general_log(general_log_printer);