Skip to content

Commit d82966d

Browse files
bladepanHerman Lee
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
1 parent a9fde68 commit d82966d

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
@@ -7830,10 +7830,9 @@ static int init_server_components() {
78307830
if (opt_general_log && query_logger.reopen_log_file(QUERY_LOG_GENERAL))
78317831
opt_general_log = false;
78327832

7833-
// Open gap lock log file if enabled.
7833+
// Open gap lock log file
78347834
query_logger.set_log_file(QUERY_LOG_GAP_LOCK);
7835-
if (query_logger.reopen_log_file(QUERY_LOG_GAP_LOCK))
7836-
LogErr(ERROR_LEVEL, ER_CANT_OPEN_FILE);
7835+
query_logger.reopen_log_file(QUERY_LOG_GAP_LOCK);
78377836

78387837
/*
78397838
Set the default storage engines

0 commit comments

Comments
 (0)