1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-15 Log all sql errors.

modified for MySQL 5.5. Logger service moved to the
        plugin/sql_errlog directory to be properly used later.

plugin/sql_errlog/sql_errlog.c:
  Fixes for bugs #956427 (SQL_ERROR_LOG plugin produces bogus warnings about sql-error-log-size-limit value) and #956463 (Server crashes if SQL_ERROR_LOG fails to initialize) they're also MDEV-184 and MDEV-183
    
  The sql_error_log_deinit() should be prepared for the logger_file to be NULL.
  The logger_file_size_limit upper limit wasn't properly set.
This commit is contained in:
Alexey Botchkov
2012-03-24 11:24:20 +01:00
parent 619f67b1b4
commit 5c01f1ac14
15 changed files with 45 additions and 79 deletions

View File

@ -80,24 +80,6 @@ void thd_progress_next_stage(void* thd);
void thd_progress_end(void* thd);
const char *set_thd_proc_info(void*, const char * info, const char *func,
const char *file, unsigned int line);
#include <mysql/service_logger.h>
typedef struct logger_handle_st LOGGER_HANDLE;
extern struct logger_service_st {
LOGGER_HANDLE* (*open)(const char *path,
unsigned long long size_limit,
unsigned int rotations);
int (*close)(LOGGER_HANDLE *log);
int (*vprintf)(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
int (*printf)(LOGGER_HANDLE *log, const char *fmt, ...);
int (*rotate)(LOGGER_HANDLE *log);
} *logger_service;
LOGGER_HANDLE *logger_open(const char *path,
unsigned long long size_limit,
unsigned int rotations);
int logger_close(LOGGER_HANDLE *log);
int logger_vprintf(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
int logger_rotate(LOGGER_HANDLE *log);
int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...);
struct st_mysql_xid {
long formatID;
long gtrid_length;