| 1163 | return false; |
| 1164 | } |
| 1165 | static bool fix_log(char** logname, const char* default_logname, |
| 1166 | const char*ext, bool enabled, void (*reopen)(char*)) |
| 1167 | { |
| 1168 | if (!*logname) // SET ... = DEFAULT |
| 1169 | { |
| 1170 | char buff[FN_REFLEN]; |
| 1171 | *logname= my_strdup(make_log_name(buff, default_logname, ext), |
| 1172 | MYF(MY_FAE+MY_WME)); |
| 1173 | if (!*logname) |
| 1174 | return true; |
| 1175 | } |
| 1176 | logger.lock_exclusive(); |
| 1177 | mysql_mutex_unlock(&LOCK_global_system_variables); |
| 1178 | if (enabled) |
| 1179 | reopen(*logname); |
| 1180 | logger.unlock(); |
| 1181 | mysql_mutex_lock(&LOCK_global_system_variables); |
| 1182 | return false; |
| 1183 | } |
| 1184 | static void reopen_general_log(char* name) |
| 1185 | { |
| 1186 | logger.get_log_file_handler()->close(0); |
no test coverage detected