diff options
author | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2006-06-19 18:30:55 +0500 |
---|---|---|
committer | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2006-06-19 18:30:55 +0500 |
commit | 0c4e184bdec77d15d055c868aea04d504bd5ae5d (patch) | |
tree | 27261ad95128926e54c2a00ce20141b60875c135 /sql/log.h | |
parent | 07703f17bd48e7a95c39dd78959d3f2145cc0370 (diff) | |
download | mariadb-git-0c4e184bdec77d15d055c868aea04d504bd5ae5d.tar.gz |
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.
mysql-test/r/show_check.result:
WL#3015: Logging Improvements - No Restarts
result fix
sql/log.cc:
WL#3015: Logging Improvements - No Restarts
added methods to LOGGER class
void deactivate_log_handlers(THD* thd, uint log_type);
bool activate_log_handlers(THD* thd, uint log_type);
added methods to Log_to_file_event_handler:
TABLE_LIST *get_mysql_slow_log()
TABLE_LIST *get_mysql_log()
sql/log.h:
WL#3015: Logging Improvements - No Restarts
added methods to LOGGER class
void deactivate_log_handlers(THD* thd, uint log_type);
bool activate_log_handlers(THD* thd, uint log_type);
added methods to Log_to_file_event_handler:
TABLE_LIST *get_mysql_slow_log()
TABLE_LIST *get_mysql_log()
sql/mysql_priv.h:
WL#3015: Logging Improvements - No Restarts
sql/mysqld.cc:
WL#3015: Logging Improvements - No Restarts
added 'slow-query-log' & 'general-log' options
sql/set_var.cc:
WL#3015: Logging Improvements - No Restarts
added 'slow_query_log' & 'general_log' updatable variables
added 'log_output', 'general_log_file', 'slow_query_log_file' updatable variables
sql/set_var.h:
WL#3015: Logging Improvements - No Restarts
new class sys_var_log_state
new class sys_var_log_output
sql/share/errmsg.txt:
WL#3015: Logging Improvements - No Restarts
added error message
sql/sql_delete.cc:
WL#3015: Logging Improvements - No Restarts
'truncate table slow_log|general', keep status of logs
Diffstat (limited to 'sql/log.h')
-rw-r--r-- | sql/log.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sql/log.h b/sql/log.h index 03d5466e549..49aae15feee 100644 --- a/sql/log.h +++ b/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 |