List of all members.
Public Member Functions |
virtual bool | init () |
virtual void | cleanup () |
virtual bool | log_slow (THD *thd, time_t current_time, time_t query_start_arg, const char *user_host, uint user_host_len, ulonglong query_utime, ulonglong lock_utime, bool is_command, const char *sql_text, uint sql_text_len) |
virtual bool | log_error (enum loglevel level, const char *format, va_list args) |
virtual bool | log_general (THD *thd, time_t event_time, const char *user_host, uint user_host_len, my_thread_id thread_id, const char *command_type, uint command_type_len, const char *sql_text, uint sql_text_len, const CHARSET_INFO *client_cs) |
int | activate_log (THD *thd, uint log_type) |
Member Function Documentation
bool Log_to_csv_event_handler::log_general |
( |
THD * |
thd, |
|
|
time_t |
event_time, |
|
|
const char * |
user_host, |
|
|
uint |
user_host_len, |
|
|
my_thread_id |
thread_id, |
|
|
const char * |
command_type, |
|
|
uint |
command_type_len, |
|
|
const char * |
sql_text, |
|
|
uint |
sql_text_len, |
|
|
const CHARSET_INFO * |
client_cs |
|
) |
| [virtual] |
Log command to the general log table
Log given command to the general log table.
- Parameters:
-
event_time | command start timestamp |
user_host | the pointer to the string with user info |
user_host_len | length of the user_host string. this is computed once and passed to all general log event handlers |
thread_id | Id of the thread, issued a query |
command_type | the type of the command being logged |
command_type_len | the length of the string above |
sql_text | the very text of the query being executed |
sql_text_len | the length of sql_text string |
- Returns:
- This function attempts to never call my_error(). This is necessary, because general logging happens already after a statement status has been sent to the client, so the client can not see the error anyway. Besides, the error is not related to the statement being executed and is internal, and thus should be handled internally (
- Todo:
- : how?). If a write to the table has failed, the function attempts to write to a short error message to the file. The failure is also indicated in the return value.
- Return values:
-
FALSE | OK |
TRUE | error occured |
Implements Log_event_handler.
The documentation for this class was generated from the following files: