diff options
Diffstat (limited to 'sql/log.h')
-rw-r--r-- | sql/log.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sql/log.h b/sql/log.h index e9429067a34..71c27f50f78 100644 --- a/sql/log.h +++ b/sql/log.h @@ -16,6 +16,9 @@ #ifndef LOG_H #define LOG_H +#include "unireg.h" // REQUIRED: for other includes +#include "handler.h" /* my_xid */ + class Relay_log_info; class Format_description_log_event; @@ -644,4 +647,36 @@ extern TYPELIB binlog_format_typelib; int query_error_code(THD *thd, bool not_killed); uint purge_log_get_error_code(int res); +int vprint_msg_to_log(enum loglevel level, const char *format, va_list args); +void sql_print_error(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2); +void sql_print_warning(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2); +void sql_print_information(const char *format, ...) + ATTRIBUTE_FORMAT(printf, 1, 2); +typedef void (*sql_print_message_func)(const char *format, ...) + ATTRIBUTE_FORMAT(printf, 1, 2); +extern sql_print_message_func sql_print_message_handlers[]; + +int error_log_print(enum loglevel level, const char *format, + va_list args); + +bool slow_log_print(THD *thd, const char *query, uint query_length, + ulonglong current_utime); + +bool general_log_print(THD *thd, enum enum_server_command command, + const char *format,...); + +bool general_log_write(THD *thd, enum enum_server_command command, + const char *query, uint query_length); + +void sql_perror(const char *message); +bool flush_error_log(); + +File open_binlog(IO_CACHE *log, const char *log_file_name, + const char **errmsg); + +char *make_log_name(char *buff, const char *name, const char* log_ext); + +extern MYSQL_PLUGIN_IMPORT MYSQL_BIN_LOG mysql_bin_log; +extern LOGGER logger; + #endif /* LOG_H */ |