lp:~tsarev/percona-server/5.1_fix_bug_728082
- Get this branch:
- bzr branch lp:~tsarev/percona-server/5.1_fix_bug_728082
Branch merges
- Percona developers: Pending requested
-
Diff: 6527 lines (+4423/-975)35 files modifiedPercona-Server/mysql-test/include/show_stats.inc (+78/-0)
Percona-Server/mysql-test/include/show_table_index_stats.inc (+20/-0)
Percona-Server/mysql-test/r/access_denied.result (+330/-0)
Percona-Server/mysql-test/r/show_stats.result (+1735/-0)
Percona-Server/mysql-test/r/user_stats.result (+90/-0)
Percona-Server/mysql-test/r/userstat_bug602047.result (+2/-0)
Percona-Server/mysql-test/t/access_denied.test (+559/-0)
Percona-Server/mysql-test/t/show_stats.test (+484/-0)
Percona-Server/mysql-test/t/user_stats.test (+135/-0)
Percona-Server/mysql-test/t/userstat_bug602047.test (+2/-0)
Percona-Server/sql/handler.cc (+112/-64)
Percona-Server/sql/handler.h (+7/-4)
Percona-Server/sql/item.cc (+1/-0)
Percona-Server/sql/mysql_priv.h (+1/-1)
Percona-Server/sql/mysqld.cc (+0/-3)
Percona-Server/sql/set_var.cc (+3/-0)
Percona-Server/sql/sp_head.cc (+1/-0)
Percona-Server/sql/sql_acl.cc (+5/-0)
Percona-Server/sql/sql_base.cc (+1/-0)
Percona-Server/sql/sql_class.cc (+102/-76)
Percona-Server/sql/sql_class.h (+20/-35)
Percona-Server/sql/sql_connect.cc (+473/-524)
Percona-Server/sql/sql_db.cc (+1/-0)
Percona-Server/sql/sql_delete.cc (+2/-2)
Percona-Server/sql/sql_insert.cc (+2/-2)
Percona-Server/sql/sql_parse.cc (+30/-21)
Percona-Server/sql/sql_prepare.cc (+6/-6)
Percona-Server/sql/sql_show.cc (+134/-97)
Percona-Server/sql/sql_trigger.cc (+1/-0)
Percona-Server/sql/sql_update.cc (+2/-2)
Percona-Server/sql/sql_view.cc (+3/-0)
Percona-Server/sql/sql_yacc.yy (+5/-5)
Percona-Server/sql/structs.h (+49/-133)
Percona-Server/sql/table.cc (+1/-0)
Percona-Server/storage/myisam/ha_myisam.cc (+26/-0)
Related bugs
Related blueprints
Branch information
- Owner:
- Oleg Tsarev
- Status:
- Development
Recent revisions
- 417. By Oleg Tsarev
-
1) Removed unnecessary sent_row_count_2: (sql/sql_class.h: class THD). Now uses sent_row_count instead of it.
2) Avoid copy-paste between THREAD_STATS and USER_STATS: moved counter to STATS structure, use it in USER_STATS and THREAD_STATS (sql/structs.h).
3) Replaced bunch of counters diff_* by STATS struct (sql/sql_class.h: class THD, also many small changes in different files).
4) Added increment of access_denied counter (different files, is related to incompleted port from Google patch).
5) Removed unnecessary LOCK_stats mutex (is related to incorrect port from Google patch).
6) Fixed incorrect kind of query detection (is related to incompleted port from Google patch):
* sql/sql_yacc.yy: SQLCOM_SHOW_[CLIENT| USER|THREAD| TABLE|INDEX] _STATS instead of SQLCOM_SELECT
* sql/sql_parse.cc: assign CF_STATUS_COMMAND flag for SHOW [CLIENT|USER|THREAD| TABLE|INDEX] _STATS commands
Without this changes code in the THD::update_stats incorrect works.7) Fixed comment for THD::get_
client_ host_port (incorrect moved in one of previous porting) 8) Removed ugly init_user_stats / init_thread_stats function (rudimentary used). Now I use direct memset(..., 0, ...) initialisation.
9) Renamed function update_
global_ user_stats to update_global_stats (because not only user_stats updated, thread_stats too) 10) Avoid copy-paste between update_
global_ user_stats_ with_user and update_ global_ user_stats_ with_thread by single function update_stats 11) Add set_connections function (related to incomplete port from Google patch) and add call to send_user_stats and send_thread_stats (bug #728082, bug #608027). Without this call statistcs from separated thread didn't aggregated to global_
[client| thread| user]_stats. 12) Add counters cleanup to sql_parse.cc: mysql_reset_
thd_for_ next_command (related to incompleted port from Google patch) 13) Add wild-card processing to:
* send_user_stats
* send_thread_stats
* fill_schema_table_stats
* fill_schema_index_stats
Without this changes LIKE and WHERE works incorrectly (related to incompleted port from Google patch).14) Removed unnecessary engine_type from TABLE STATS (changes related to changes from Percona).
15) Removed unnecessary add_thead_stats / add_user_stats functions.
16) Added DBUG_ENTER/
DBUG_RETURN/ DBUG_VOID_ RETURN information to related functions. 17) Fixed code policy / added comments to function for all related code.
18) Added EXTENDED_
FOR_USERSTAT macros to storage/ myisam/ ha_myisam. cc - 416. By Oleg Tsarev
-
1) I fixed test userstats_bug602047 (incorrect behavior on --repeat run).
2) I ported following tests from http://code.google. com/p/google- mysql-tools/:
* access_denied
* user_stats
* show_stats
3) sql_connect.cc - added Debug Variable signal_end_connection for activate Debug Signal end_connection after connection close and before end of thread to the handle_ one_connection function (required for catch closed connection).
Alternative way - SHOW PROCESSLIST works worse: affected to collected statistics.
Disable statistics while wait of close connection is worse too, I need catch changes in statistics related to close of connection.
4) user_stats.tests:
- I moved all queries to check statistics to include/show_stats. inc
- I now check all columns of statistics tables.
- I checked SHOW *_STATISTICS and SELECT * FROM INFORMATION_SCHEMA. *_STATISTICS (originally test checked just SHOW syntax)
- I checked WHERE and LIKE condition both on SHOW and SELECT syntax
- I checked results on every combination - SHOW/SELECT, LIKE/WHERE
- I added checks to THREAD_STATISTICS (this is Percona-specific extension, originally Google patch didn't have it)
- I fixed sporadic tests fails related to thread concurrency (not completed connection) by wait Debug Signal end_connection
- I removed sleep from test
- I added backup of mysql.user before test run (need for correct check of test case).
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)