-
Notifications
You must be signed in to change notification settings - Fork 713
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Port of all of our 5.1 user stats diffs. Table columns: USER_NAME // data stats BINLOG_BYTES_WRITTEN - number of bytes written to the binlo BYTES_RECEIVED, BYTES_SENT - number of network bytes received or sent // commands count COMMANDS_DDL - number of DDL commands COMMANDS_DELETE - number of DELETE and TRUNCATE commands COMMANDS_HANDLER - number of HANDLER COMMANDS_INSERT - number of INSERT, INSERT SELECT, LOAD and REPLACE commands COMMANDS_OTHER - number of other commands COMMANDS_SELECT - number of SELECT commands COMMANDS_TRANSACTION - number of BEGIN, COMMIT, ROLLBACK commands COMMANDS_UPDATE - number of UPDATE commands // connections CONNECTIONS_CONCURRENT - concurrent connections for this user CONNECTIONS_DENIED_MAX_GLOBAL - number of connections denied because the global connection limit was reached CONNECTIONS_DENIED_MAX_USER -number of connections denied because the per user limit was reached CONNECTIONS_LOST - number of connections lost rather than properly closed CONNECTIONS_TOTAL - total number of connections // io perf DISK_READ_BYTES DISK_READ_REQUESTS DISK_READ_SVC_USECS DISK_READ_WAIT_USECS DISK_READ_BYTES_BLOB DISK_READ_REQUESTS_BLOB DISK_READ_SVC_USECS_BLOB DISK_READ_WAIT_USECS_BLOB // error counts ERRORS_ACCESS_DENIED - number of access denied errors ERRORS_TOTAL // timers MICROSECONDS_WALL - number of wallclock seconds running commands MICROSECONDS_DDL MICROSECONDS_DELETE MICROSECONDS_HANDLER MICROSECONDS_INSERT MICROSECONDS_OTHER MICROSECONDS_SELECT MICROSECONDS_TRANSACTION MICROSECONDS_UPDATE // empty query QUERIES_EMPTY - number of queries that return 0 rows // row stats ROWS_DELETED - number of rows deleted ROWS_FETCHED - number of rows sent back to a user ROWS_INSERTED - number of rows inserted ROWS_READ - number of rows read from a table ROWS_UPDATED - number of rows updated ROWS_INDEX_FIRST ROWS_INDEX_NEXT // transaction stats TRANSACTIONS_COMMIT - number of commits, this includes auto-commit TRANSACTIONS_ROLLBACK number of rollbacks Tests added: user_stats_bytes user_stats_max_conns user_stats_rows_primary user_stats_rows user_stats_commands user_stats_disk user_stats_errors user_stats_more user_stats_rows_fetched user_stats_rows_secondary user_stats_transactions rpl.rpl_user_stats_rows rpl.rpl_user_stats_bytes Tests modified: information_schema sys_vars.max_user_connections_func Test results changed: information_schema_db mysqlshow funcs_1.is_columns_is funcs_1.is_tables_is Test Plan: mtr Reviewers: steaphan Reviewed By: steaphan
- Loading branch information
Rongrong Zhong
authored and
Herman Lee
committed
Jan 24, 2017
1 parent
f6ddb53
commit 4554e16
Showing
60 changed files
with
4,021 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
drop table if exists userstats; | ||
create table userstats (i int primary key, j int); | ||
flush statistics; | ||
|
||
At start | ||
|
||
select bytes_sent, bytes_received from information_schema.user_statistics where user_name = 'root';; | ||
bytes_sent 11 | ||
bytes_received 104 | ||
insert into userstats values (1,1); | ||
|
||
after insert | ||
|
||
select bytes_sent, bytes_received from information_schema.user_statistics where user_name = 'root';; | ||
bytes_sent 252 | ||
bytes_received 247 | ||
select * from userstats; | ||
i j | ||
1 1 | ||
|
||
after select | ||
|
||
select bytes_sent, bytes_received from information_schema.user_statistics where user_name = 'root';; | ||
bytes_sent 614 | ||
bytes_received 379 | ||
drop table userstats; |
Oops, something went wrong.