mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
WL#5142 FLUSH LOGS should take optional arguments for which log(s) to flush
Support for flushing individual logs, so that the user can selectively flush a subset of the server logs. Flush of individual logs is done according to the following syntax: FLUSH <log_category> LOGS; The syntax is extended so that the user is able to flush a subset of logs: FLUSH [log_category LOGS,]; where log_category is one of: SLOW ERROR BINARY ENGINE GENERAL RELAY. mysql-test/suite/rpl/r/rpl_flush_logs.result: Test result for WL#5142. mysql-test/suite/rpl/t/rpl_flush_logs.test: Added the test file to verify if the 'flush individual log' statement works fine. sql/log.cc: Added the two functions to flush slow and general log. sql/sql_parse.cc: Added code to flush specified logs against the option. sql/sql_yacc.yy: Added code to parse the 'flush * log' statement syntax and set its option to Lex->type.
This commit is contained in:
@@ -570,6 +570,8 @@ public:
|
||||
void init_base();
|
||||
void init_log_tables();
|
||||
bool flush_logs(THD *thd);
|
||||
bool flush_slow_log();
|
||||
bool flush_general_log();
|
||||
/* Perform basic logger cleanup. this will leave e.g. error log open. */
|
||||
void cleanup_base();
|
||||
/* Free memory. Nothing could be logged after this function is called */
|
||||
|
Reference in New Issue
Block a user