diff options
author | Michael Widenius <monty@askmonty.org> | 2011-02-03 16:45:29 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-02-03 16:45:29 +0200 |
commit | cfa0c6ff1d8f7268f895d79daf94e7d29197327d (patch) | |
tree | e3736127519b619e139ee20232958ce4298f2fc6 /sql | |
parent | 3edf4dcd5a36be8d5acc94e0c5e29e77e47cd15b (diff) | |
download | mariadb-git-cfa0c6ff1d8f7268f895d79daf94e7d29197327d.tar.gz |
Increased precision for status variables Rows_sent and Rows_read from long to longlong
Fixed that status variables 'empty_queries', 'access_denied_errors' and 'lost_connections' are propageted to global status.
This should also remove some warnings with VC++
sql/mysqld.cc:
Increased precision for status variables Rows_sent and Rows_read from long to longlong
sql/sql_class.cc:
Increased precision for status variables Rows_sent and Rows_read from long to longlong
sql/sql_class.h:
Increased precision for status variables Rows_sent and Rows_read from long to longlong
Fixed that status variables 'empty_queries', 'access_denied_errors' and 'lost_connections' are propageted to global status.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 4 | ||||
-rw-r--r-- | sql/sql_class.cc | 4 | ||||
-rw-r--r-- | sql/sql_class.h | 10 |
3 files changed, 11 insertions, 7 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 3d6879e5b23..828dc27583f 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -8052,8 +8052,8 @@ SHOW_VAR status_vars[]= { {"Opened_tables", (char*) offsetof(STATUS_VAR, opened_tables), SHOW_LONG_STATUS}, {"Opened_table_definitions", (char*) offsetof(STATUS_VAR, opened_shares), SHOW_LONG_STATUS}, {"Prepared_stmt_count", (char*) &show_prepared_stmt_count, SHOW_FUNC}, - {"Rows_sent", (char*) offsetof(STATUS_VAR, rows_sent), SHOW_LONG_STATUS}, - {"Rows_read", (char*) offsetof(STATUS_VAR, rows_read), SHOW_LONG_STATUS}, + {"Rows_sent", (char*) offsetof(STATUS_VAR, rows_sent), SHOW_LONGLONG_STATUS}, + {"Rows_read", (char*) offsetof(STATUS_VAR, rows_read), SHOW_LONGLONG_STATUS}, #ifdef HAVE_QUERY_CACHE {"Qcache_free_blocks", (char*) &query_cache.free_memory_blocks, SHOW_LONG_NOFLUSH}, {"Qcache_free_memory", (char*) &query_cache.free_memory, SHOW_LONG_NOFLUSH}, diff --git a/sql/sql_class.cc b/sql/sql_class.cc index b64a5a71514..4b3138ecab8 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1190,6 +1190,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; @@ -1223,6 +1225,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; diff --git a/sql/sql_class.h b/sql/sql_class.h index 2fe579713e1..f496cbe3b74 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -468,8 +468,6 @@ typedef struct system_status_var ulong select_range_count; ulong select_range_check_count; ulong select_scan_count; - ulong rows_read; - ulong rows_sent; ulong long_query_count; ulong filesort_merge_passes; ulong filesort_range_count; @@ -483,6 +481,9 @@ typedef struct system_status_var ulong com_stmt_fetch; ulong com_stmt_reset; ulong com_stmt_close; + ulong empty_queries; + ulong access_denied_errors; + ulong lost_connections; /* Number of statements sent from the client */ @@ -493,11 +494,10 @@ typedef struct system_status_var Below 'last_system_status_var' are all variables that cannot be handled automatically by add_to_status()/add_diff_to_status(). */ - ulong empty_queries; - ulong access_denied_errors; /* Can only be 0 or 1 */ - ulong lost_connections; ulonglong bytes_received; ulonglong bytes_sent; + ulonglong rows_read; + ulonglong rows_sent; ulonglong binlog_bytes_written; double last_query_cost; double cpu_time, busy_time; |