~tsarev/percona-server/5.5_fix_bug_716210

Viewing all changes in revision 151.

  • Committer: Oleg Tsarev
  • Date: 2011-09-28 12:02:12 UTC
  • Revision ID: oleg.tsarev@percona.com-20110928120212-cjuoqsz4qbwrfw8b
  * "all statistics variables used in slow_extended.patch and thd->send_row_count and thd->examined_row_count" == SESV (Slow Extended Statistic Variables)

  * Added to class THD (sql/sql_class.h) following methods:
         1) clear_slow_extended - clear SESV
         2) reset_sub_statement_state_slow_extended(Sub_statement_state *backup) - backup SESV to backup area
         3) restore_sub_statement_state_slow_extended(Sub_statement_state *backup) - restore SESV from backup area

  * Added to class Sub_statement_state (sql/sql_class.h) required for correct backup variables

  * Added to class THD (sql/sql_class.h) comments near the SESV with explanations of purpose of variables

  * Added call of clear_slow_extended to THD::init() (required on THD class initialisation and change_user)

  * Fix admin command processing in LOGGER::slow_log_print (sql/loc.cc). Before fix SESV don't clean correctly (because if(!query_length) never was true).
    Explanation: 
      1) query and query_length according to comment in sql_class.h always correlated - if query == NULL => query_length == 0, and if query != NULL => query_length != 0
      2) After "if (!query) { ... }" query_lenght always not 0
      3) if (!query_length) (code before my fix) always trye

  * Fixed accoring to code policy code formating in "increment_thd_innodb_stats" (sql/sql_class.cc)

  * Fixed THD::reset_for_next_command (sql/sql_parse.cc) - replace variables cleaning by clear_slow_extended call

  * Fixed bug #716210: add thd->clear_slow_extended() to dispatch_command()
    Explanation: before dispatch_command mysql doesn't call "reset_for_next_command" and SESV inherited from previous query

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: