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

Method activate_log_handler

sql/log.cc:479–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477
478
479bool LOGGER::activate_log_handler(THD* thd, uint log_type)
480{
481 MYSQL_QUERY_LOG *file_log;
482 bool res= FALSE;
483 lock_exclusive();
484 switch (log_type) {
485 case QUERY_LOG_GENERAL:
486 if (!opt_log)
487 {
488 file_log= file_log_handler->get_mysql_log();
489
490 file_log->open_query_log(opt_logname);
491 init_general_log(log_output_options);
492 opt_log= TRUE;
493 }
494 break;
495 default:
496 DBUG_ASSERT(0);
497 }
498 unlock();
499 return res;
500}
501
502
503void LOGGER::deactivate_log_handler(THD *thd, uint log_type)

Callers 1

fix_log_stateFunction · 0.80

Calls 2

get_mysql_logMethod · 0.80
open_query_logMethod · 0.80

Tested by

no test coverage detected