MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / flush_general_log

Method flush_general_log

sql/log.cc:359–375  ·  view source on GitHub ↗

Close and reopen the general log (with locks). @returns FALSE. */

Source from the content-addressed store, hash-verified

357 @returns FALSE.
358*/
359bool LOGGER::flush_general_log()
360{
361 /*
362 Now we lock logger, as nobody should be able to use logging routines while
363 log tables are closed
364 */
365 logger.lock_exclusive();
366
367 /* Reopen general log file */
368 if (opt_log)
369 file_log_handler->get_mysql_log()->reopen_file();
370
371 /* End of log flush */
372 logger.unlock();
373
374 return 0;
375}
376
377
378bool LOGGER::general_log_write(THD *thd, enum enum_server_command command,

Callers

nothing calls this directly

Calls 4

lock_exclusiveMethod · 0.80
reopen_fileMethod · 0.80
get_mysql_logMethod · 0.80
unlockMethod · 0.45

Tested by

no test coverage detected