~tsarev/percona-server/5.1_fix_bug_924872

Viewing all changes in revision 424.

  • Committer: Oleg Tsarev
  • Date: 2012-02-01 14:20:40 UTC
  • Revision ID: zabivator@gmail.com-20120201142040-p880lc43s0tx84m4
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 #924872). 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

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: