summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 52101c855d0..6570553d7e8 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1194,6 +1194,8 @@ void add_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var)
/* Handle the not ulong variables. See end of system_status_var */
to_var->bytes_received= from_var->bytes_received;
to_var->bytes_sent+= from_var->bytes_sent;
+ to_var->rows_read+= from_var->rows_read;
+ to_var->rows_sent+= from_var->rows_sent;
to_var->binlog_bytes_written= from_var->binlog_bytes_written;
to_var->cpu_time+= from_var->cpu_time;
to_var->busy_time+= from_var->busy_time;
@@ -1227,6 +1229,8 @@ void add_diff_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var,
to_var->bytes_received+= from_var->bytes_received -
dec_var->bytes_received;
to_var->bytes_sent+= from_var->bytes_sent - dec_var->bytes_sent;
+ to_var->rows_read+= from_var->rows_read - dec_var->rows_read;
+ to_var->rows_sent+= from_var->rows_sent - dec_var->rows_sent;
to_var->binlog_bytes_written+= from_var->binlog_bytes_written -
dec_var->binlog_bytes_written;
to_var->cpu_time+= from_var->cpu_time - dec_var->cpu_time;
@@ -4069,8 +4073,8 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
int errcode)
{
DBUG_ENTER("THD::binlog_query");
- DBUG_PRINT("enter", ("qtype: %s query: '%s'",
- show_query_type(qtype), query_arg));
+ DBUG_PRINT("enter", ("qtype: %s query: '%-.*s'",
+ show_query_type(qtype), (int) query_len, query_arg));
DBUG_ASSERT(query_arg && mysql_bin_log.is_open());
/*
@@ -4106,7 +4110,7 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
{
sql_print_warning("%s Statement: %.*s",
ER(ER_BINLOG_UNSAFE_STATEMENT),
- MYSQL_ERRMSG_SIZE, query_arg);
+ (int) min(MYSQL_ERRMSG_SIZE, query_len), query_arg);
binlog_flags|= BINLOG_FLAG_UNSAFE_STMT_PRINTED;
}
}