53
int open(const char *opt_name __attribute__((unused)))
53
int open(const char *)
55
55
void close(void) { }
56
int log_xid(Session *session __attribute__((unused)),
57
my_xid xid __attribute__((unused))) { return 1; }
58
void unlog(ulong cookie __attribute__((unused)),
59
my_xid xid __attribute__((unused))) { }
56
int log_xid(Session *, my_xid) { return 1; }
57
void unlog(ulong, my_xid) { }
374
377
virtual ~Log_event_handler() {}
378
/* Class which manages slow, general and error log event handlers */
381
rw_lock_t LOCK_logger;
382
/* flag to check whether logger mutex is initialized */
385
/* NULL-terminated arrays of log handlers */
386
Log_event_handler *error_log_handler_list[MAX_LOG_HANDLERS_NUM + 1];
392
void lock_shared() { rw_rdlock(&LOCK_logger); }
393
void lock_exclusive() { rw_wrlock(&LOCK_logger); }
394
void unlock() { rw_unlock(&LOCK_logger); }
395
bool log_command(Session *session, enum enum_server_command command);
398
We want to initialize all log mutexes as soon as possible,
399
but we cannot do it in constructor, as safe_mutex relies on
400
initialization, performed by MY_INIT(). This why this is done in
404
bool flush_logs(Session *session);
405
/* Perform basic logger cleanup. this will leave e.g. error log open. */
407
/* Free memory. Nothing could be logged after this function is called */
409
bool error_log_print(enum loglevel level, const char *format,
411
/* we use this function to setup all enabled log event handlers */
412
int set_handlers(uint32_t error_log_printer);
413
void init_error_log(uint32_t error_log_printer);
416
380
extern TYPELIB binlog_format_typelib;
418
382
void sql_print_error(const char *format, ...) __attribute__((format(printf, 1, 2)));
423
387
__attribute__((format(printf, 1, 2)));
424
388
extern sql_print_message_func sql_print_message_handlers[];
426
int error_log_print(enum loglevel level, const char *format,
429
390
void sql_perror(const char *message);