| 1000 | |
| 1001 | |
| 1002 | void MYSQL_QUERY_LOG::reopen_file() |
| 1003 | { |
| 1004 | char *save_name; |
| 1005 | |
| 1006 | DBUG_ENTER("MYSQL_LOG::reopen_file"); |
| 1007 | if (!is_open()) |
| 1008 | { |
| 1009 | DBUG_PRINT("info",("log is closed")); |
| 1010 | DBUG_VOID_RETURN; |
| 1011 | } |
| 1012 | |
| 1013 | mysql_mutex_lock(&LOCK_log); |
| 1014 | |
| 1015 | save_name= name; |
| 1016 | name= 0; // Don't free name |
| 1017 | close(LOG_CLOSE_TO_BE_OPENED); |
| 1018 | |
| 1019 | /* |
| 1020 | Note that at this point, log_state != LOG_CLOSED (important for is_open()). |
| 1021 | */ |
| 1022 | |
| 1023 | open( |
| 1024 | #ifdef HAVE_PSI_INTERFACE |
| 1025 | m_log_file_key, |
| 1026 | #endif |
| 1027 | save_name, log_type, 0, io_cache_type, false); |
| 1028 | my_free(save_name); |
| 1029 | |
| 1030 | mysql_mutex_unlock(&LOCK_log); |
| 1031 | |
| 1032 | DBUG_VOID_RETURN; |
| 1033 | } |
| 1034 | |
| 1035 | |
| 1036 | /* |
no test coverage detected