|
| | File_query_log (enum_log_table_type log_type) |
| |
| | ~File_query_log () |
| |
| bool | is_open () const |
| |
| bool | open () |
| | Open a (new) log file. More...
|
| |
| void | close () |
| | Close the log file. More...
|
| |
| bool | set_file (const char *new_name) |
| | Change what file we log to. More...
|
| |
| void | check_and_print_write_error () |
| | Check if we have already printed ER_ERROR_ON_WRITE and if not, do so. More...
|
| |
| bool | write_general (ulonglong event_utime, my_thread_id thread_id, const char *command_type, size_t command_type_len, const char *sql_text, size_t sql_text_len) |
| | Write a command to traditional general log file. More...
|
| |
| bool | write_slow (THD *thd, ulonglong current_utime, ulonglong query_start_utime, const char *user_host, size_t user_host_len, ulonglong query_utime, ulonglong lock_utime, bool is_command, const char *sql_text, size_t sql_text_len) |
| | Log a query to the traditional slow log file. More...
|
| |
◆ File_query_log()
◆ ~File_query_log()
| File_query_log::~File_query_log |
( |
| ) |
|
|
inlineprivate |
◆ check_and_print_write_error()
| void File_query_log::check_and_print_write_error |
( |
| ) |
|
|
private |
Check if we have already printed ER_ERROR_ON_WRITE and if not, do so.
◆ close()
| void File_query_log::close |
( |
void |
| ) |
|
|
private |
Close the log file.
- Note
- One can do an open on the object at once after doing a close. The internal structures are not freed until the destructor is called.
◆ is_open()
| bool File_query_log::is_open |
( |
| ) |
const |
|
inlineprivate |
- Returns
- true if the file log is open, false otherwise.
◆ open()
| bool File_query_log::open |
( |
| ) |
|
|
private |
Open a (new) log file.
Open the logfile, init IO_CACHE and write startup messages.
- Returns
- true if error, false otherwise.
◆ set_file()
| bool File_query_log::set_file |
( |
const char * |
new_name | ) |
|
|
private |
Change what file we log to.
◆ write_general()
| bool File_query_log::write_general |
( |
ulonglong |
event_utime, |
|
|
my_thread_id |
thread_id, |
|
|
const char * |
command_type, |
|
|
size_t |
command_type_len, |
|
|
const char * |
sql_text, |
|
|
size_t |
sql_text_len |
|
) |
| |
|
private |
Write a command to traditional general log file.
Log given command to normal (not rotatable) log file.
- Parameters
-
| event_utime | Command start timestamp in micro seconds |
| thread_id | Id of the thread that issued the 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
- true if error, false otherwise.
◆ write_slow()
| bool File_query_log::write_slow |
( |
THD * |
thd, |
|
|
ulonglong |
current_utime, |
|
|
ulonglong |
query_start_utime, |
|
|
const char * |
user_host, |
|
|
size_t |
user_host_len, |
|
|
ulonglong |
query_utime, |
|
|
ulonglong |
lock_utime, |
|
|
bool |
is_command, |
|
|
const char * |
sql_text, |
|
|
size_t |
sql_text_len |
|
) |
| |
|
private |
Log a query to the traditional slow log file.
- Parameters
-
| thd | THD of the query |
| current_utime | Current timestamp in microseconds |
| query_start_utime | Command start timestamp in microseconds |
| user_host | The pointer to the string with user@host info |
| user_host_len | Length of the user_host string |
| query_utime | Number of microseconds query execution took |
| lock_utime | Number of microseconds the query was locked |
| is_command | The flag which determines whether the sql_text is a query or an administrator command |
| sql_text | The query or administrator in textual form |
| sql_text_len | The length of sql_text string |
- Returns
- true if error, false otherwise.
◆ Log_to_file_event_handler
◆ Query_logger
◆ db
Last seen current database.
◆ LOCK_log
Makes sure we only have one write at a time.
◆ log_file
◆ log_file_name
| char File_query_log::log_file_name[FN_REFLEN] |
|
private |
◆ log_open
| volatile bool File_query_log::log_open |
|
private |
True if the file log is open, false otherwise.
◆ m_log_file_key
Instrumentation key to use for file io in log_file.
◆ m_log_type
◆ name
| char* File_query_log::name |
|
private |
◆ write_error
| bool File_query_log::write_error |
|
private |
Have we already printed ER_ERROR_ON_WRITE?
The documentation for this class was generated from the following file: