Skip to content

Commit 9f101f0

Browse files
bladepanfacebook-github-bot
authored andcommitted
fix QUERY_LOG_GAP_LOCK ER_CANT_OPEN_FILE log crashes the server
Summary: in mysqld.cc `LogErr(ERROR_LEVEL, ER_CANT_OPEN_FILE)` crashes the server because it does not pass parameter for error message format. This log is not needed because `query_logger.reopen_log_file(QUERY_LOG_GAP_LOCK)` already writes error log on error. Squash with "Optionally block/log queries relying on Gap Locks [non-RocksDB part]" Differential Revision: D46373689 Privacy Context Container: L1124648 fbshipit-source-id: d1a9e6b
1 parent e7877a4 commit 9f101f0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sql/mysqld.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7664,10 +7664,9 @@ static int init_server_components() {
76647664
if (opt_general_log && query_logger.reopen_log_file(QUERY_LOG_GENERAL))
76657665
opt_general_log = false;
76667666

7667-
// Open gap lock log file if enabled.
7667+
// Open gap lock log file
76687668
query_logger.set_log_file(QUERY_LOG_GAP_LOCK);
7669-
if (query_logger.reopen_log_file(QUERY_LOG_GAP_LOCK))
7670-
LogErr(ERROR_LEVEL, ER_CANT_OPEN_FILE);
7669+
query_logger.reopen_log_file(QUERY_LOG_GAP_LOCK);
76717670

76727671
/*
76737672
Set the default storage engines

0 commit comments

Comments
 (0)