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

Method flush_logs

sql/log.cc:336–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334
335
336bool LOGGER::flush_logs(THD *thd)
337{
338 int rc= 0;
339
340 /*
341 Now we lock logger, as nobody should be able to use logging routines while
342 log tables are closed
343 */
344 logger.lock_exclusive();
345
346 /* reopen log files */
347 file_log_handler->flush();
348
349 /* end of log flush */
350 logger.unlock();
351 return rc;
352}
353
354/**
355 Close and reopen the general log (with locks).

Callers

nothing calls this directly

Calls 3

lock_exclusiveMethod · 0.80
flushMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected