diff options
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sql/log.cc b/sql/log.cc index 23326532388..7ad9790bb13 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB + Copyright (c) 2009, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -646,7 +646,7 @@ void Log_to_csv_event_handler::cleanup() bool Log_to_csv_event_handler:: log_general(THD *thd, my_hrtime_t event_time, const char *user_host, - uint user_host_len, int thread_id_arg, + uint user_host_len, my_thread_id thread_id_arg, const char *command_type, uint command_type_len, const char *sql_text, uint sql_text_len, CHARSET_INFO *client_cs) @@ -1056,7 +1056,7 @@ bool Log_to_file_event_handler:: bool Log_to_file_event_handler:: log_general(THD *thd, my_hrtime_t event_time, const char *user_host, - uint user_host_len, int thread_id_arg, + uint user_host_len, my_thread_id thread_id_arg, const char *command_type, uint command_type_len, const char *sql_text, uint sql_text_len, CHARSET_INFO *client_cs) @@ -2850,12 +2850,11 @@ void MYSQL_QUERY_LOG::reopen_file() */ bool MYSQL_QUERY_LOG::write(time_t event_time, const char *user_host, - uint user_host_len, int thread_id_arg, + uint user_host_len, my_thread_id thread_id_arg, const char *command_type, uint command_type_len, const char *sql_text, uint sql_text_len) { char buff[32]; - uint length= 0; char local_time_buff[MAX_TIME_SIZE]; struct tm start; uint time_buff_len= 0; @@ -2889,7 +2888,7 @@ bool MYSQL_QUERY_LOG::write(time_t event_time, const char *user_host, goto err; /* command_type, thread_id */ - length= my_snprintf(buff, 32, "%5ld ", (long) thread_id_arg); + size_t length= my_snprintf(buff, 32, "%5llu ", thread_id_arg); if (my_b_write(&log_file, (uchar*) buff, length)) goto err; @@ -2973,7 +2972,7 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time, int tmp_errno= 0; char buff[80], *end; char query_time_buff[22+7], lock_time_buff[22+7]; - uint buff_len; + size_t buff_len; end= buff; if (!(specialflag & SPECIAL_SHORT_LOG_FORMAT)) @@ -10244,8 +10243,8 @@ IO_CACHE * get_trans_log(THD * thd) if (cache_mngr) return cache_mngr->get_binlog_cache_log(true); - WSREP_DEBUG("binlog cache not initialized, conn: %lld", - (longlong) thd->thread_id); + WSREP_DEBUG("binlog cache not initialized, conn: %llu", + thd->thread_id); return NULL; } @@ -10283,8 +10282,8 @@ void thd_binlog_trx_reset(THD * thd) void thd_binlog_rollback_stmt(THD * thd) { - WSREP_DEBUG("thd_binlog_rollback_stmt connection: %lld", - (longlong) thd->thread_id); + WSREP_DEBUG("thd_binlog_rollback_stmt connection: %llu", + thd->thread_id); binlog_cache_mngr *const cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); if (cache_mngr) |