summaryrefslogtreecommitdiff
path: root/sql/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/log.h')
-rw-r--r--sql/log.h53
1 files changed, 23 insertions, 30 deletions
diff --git a/sql/log.h b/sql/log.h
index 6305dd97355..098824d9ec8 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -359,14 +359,13 @@ class MYSQL_QUERY_LOG: public MYSQL_LOG
public:
MYSQL_QUERY_LOG() : last_time(0) {}
void reopen_file();
- bool write(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);
+ bool write(time_t event_time, const char *user_host, size_t user_host_len, my_thread_id thread_id,
+ const char *command_type, size_t command_type_len,
+ const char *sql_text, size_t sql_text_len);
bool write(THD *thd, time_t current_time,
- const char *user_host, uint user_host_len,
+ const char *user_host, size_t user_host_len,
ulonglong query_utime, ulonglong lock_utime, bool is_command,
- const char *sql_text, uint sql_text_len);
+ const char *sql_text, size_t sql_text_len);
bool open_slow_log(const char *log_name)
{
char buf[FN_REFLEN];
@@ -950,16 +949,14 @@ public:
virtual void cleanup()= 0;
virtual bool log_slow(THD *thd, my_hrtime_t current_time,
- const char *user_host,
- uint user_host_len, ulonglong query_utime,
+ const char *user_host, size_t user_host_len, ulonglong query_utime,
ulonglong lock_utime, bool is_command,
- const char *sql_text, uint sql_text_len)= 0;
+ const char *sql_text, size_t sql_text_len)= 0;
virtual bool log_error(enum loglevel level, const char *format,
va_list args)= 0;
- virtual bool log_general(THD *thd, my_hrtime_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,
+ virtual bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, size_t user_host_len, my_thread_id thread_id,
+ const char *command_type, size_t command_type_len,
+ const char *sql_text, size_t sql_text_len,
CHARSET_INFO *client_cs)= 0;
virtual ~Log_event_handler() {}
};
@@ -979,16 +976,14 @@ public:
virtual void cleanup();
virtual bool log_slow(THD *thd, my_hrtime_t current_time,
- const char *user_host,
- uint user_host_len, ulonglong query_utime,
+ const char *user_host, size_t user_host_len, ulonglong query_utime,
ulonglong lock_utime, bool is_command,
- const char *sql_text, uint sql_text_len);
+ const char *sql_text, size_t sql_text_len);
virtual bool log_error(enum loglevel level, const char *format,
va_list args);
- virtual bool log_general(THD *thd, my_hrtime_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,
+ virtual bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, size_t user_host_len, my_thread_id thread_id,
+ const char *command_type, size_t command_type_len,
+ const char *sql_text, size_t sql_text_len,
CHARSET_INFO *client_cs);
int activate_log(THD *thd, uint log_type);
@@ -1011,16 +1006,14 @@ public:
virtual void cleanup();
virtual bool log_slow(THD *thd, my_hrtime_t current_time,
- const char *user_host,
- uint user_host_len, ulonglong query_utime,
+ const char *user_host, size_t user_host_len, ulonglong query_utime,
ulonglong lock_utime, bool is_command,
- const char *sql_text, uint sql_text_len);
+ const char *sql_text, size_t sql_text_len);
virtual bool log_error(enum loglevel level, const char *format,
va_list args);
- virtual bool log_general(THD *thd, my_hrtime_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,
+ virtual bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, size_t user_host_len, my_thread_id thread_id,
+ const char *command_type, size_t command_type_len,
+ const char *sql_text, size_t sql_text_len,
CHARSET_INFO *client_cs);
void flush();
void init_pthread_objects();
@@ -1074,12 +1067,12 @@ public:
void cleanup_end();
bool error_log_print(enum loglevel level, const char *format,
va_list args);
- bool slow_log_print(THD *thd, const char *query, uint query_length,
+ bool slow_log_print(THD *thd, const char *query, size_t query_length,
ulonglong current_utime);
bool general_log_print(THD *thd,enum enum_server_command command,
const char *format, va_list args);
bool general_log_write(THD *thd, enum enum_server_command command,
- const char *query, uint query_length);
+ const char *query, size_t query_length);
/* we use this function to setup all enabled log event handlers */
int set_handlers(ulonglong error_log_printer,
@@ -1131,7 +1124,7 @@ bool general_log_print(THD *thd, enum enum_server_command command,
const char *format,...);
bool general_log_write(THD *thd, enum enum_server_command command,
- const char *query, uint query_length);
+ const char *query, size_t query_length);
void binlog_report_wait_for(THD *thd, THD *other_thd);
void sql_perror(const char *message);