Merge pull request #2438 from bskllzh/v2.0.9

Fix add a mutex lock twice in the process of function call(log_audit_…
pull/2443/head
René Cannaò 6 years ago committed by GitHub
commit 3070e03620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -234,7 +234,8 @@ void MySQL_Event::write_auth(std::fstream *f, MySQL_Session *sess) {
}
// for performance reason, we are moving the write lock
// right before the write to disk
GloMyLogger->wrlock();
//GloMyLogger->wrlock();
//move wrlock() function to log_audit_entry() function, avoid to get a null pointer in a multithreaded environment
*f << j.dump(-1, ' ', false, json::error_handler_t::replace) << std::endl;
}

Loading…
Cancel
Save