mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
WL#3015: Logging Improvements - No Restarts(ver N4)
Added slow_query_log & general_log global upadatable variables. Added slow-query-log & general-log startup options. Added log_output, general_log_file, slow_query_log_file global updatable variables.
This commit is contained in:
19
sql/log.h
19
sql/log.h
@ -438,6 +438,8 @@ public:
|
||||
CHARSET_INFO *client_cs);
|
||||
void flush();
|
||||
void init_pthread_objects();
|
||||
MYSQL_LOG *get_mysql_slow_log() { return &mysql_slow_log; }
|
||||
MYSQL_LOG *get_mysql_log() { return &mysql_log; }
|
||||
};
|
||||
|
||||
|
||||
@ -510,8 +512,21 @@ public:
|
||||
void init_error_log(uint error_log_printer);
|
||||
void init_slow_log(uint slow_log_printer);
|
||||
void init_general_log(uint general_log_printer);
|
||||
};
|
||||
|
||||
void deactivate_log_handler(THD* thd, uint log_type);
|
||||
bool activate_log_handler(THD* thd, uint log_type);
|
||||
MYSQL_LOG *get_slow_log_file_handler()
|
||||
{
|
||||
if (file_log_handler)
|
||||
return file_log_handler->get_mysql_slow_log();
|
||||
return NULL;
|
||||
}
|
||||
MYSQL_LOG *get_log_file_handler()
|
||||
{
|
||||
if (file_log_handler)
|
||||
return file_log_handler->get_mysql_log();
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
enum enum_binlog_format {
|
||||
BINLOG_FORMAT_STMT= 0, // statement-based
|
||||
|
Reference in New Issue
Block a user