| 501 | |
| 502 | |
| 503 | void 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 */ |
no test coverage detected