Created by Oleg Tsarev on 2012-01-18 and last modified on 2012-01-28
Get this branch:
bzr branch lp:~tsarev/percona-server/5.1_fix_bug_728082
Only Oleg Tsarev can upload to this branch. If you are Oleg Tsarev please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Recent revisions

418. By Oleg Tsarev on 2012-01-28

update from lp:percona-server/5.1

417. By Oleg Tsarev on 2012-01-28

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_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 on 2012-01-28

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).

410. By Stewart Smith on 2011-11-29

fix version number in Makefile

409. By Stewart Smith on 2011-11-24

merge makefile fix

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.