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

Method deactivate_log_handler

sql/log.cc:503–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501
502
503void LOGGER::deactivate_log_handler(THD *thd, uint log_type)
504{
505 my_bool *tmp_opt= 0;
506 MYSQL_LOG *file_log= NULL;
507
508 switch (log_type) {
509 case QUERY_LOG_GENERAL:
510 tmp_opt= &opt_log;
511 file_log= file_log_handler->get_mysql_log();
512 break;
513 default:
514 MY_ASSERT_UNREACHABLE();
515 }
516
517 if (!(*tmp_opt))
518 return;
519
520 lock_exclusive();
521 file_log->close(0);
522 *tmp_opt= FALSE;
523 unlock();
524}
525
526
527/* the parameters are unused for the log tables */

Callers 1

fix_log_stateFunction · 0.80

Calls 2

get_mysql_logMethod · 0.80
closeMethod · 0.80

Tested by

no test coverage detected