• unknown's avatar
    A fix for Bug#9141 "4.1 does not log into slow log · 51cd70da
    unknown authored
    ALTER, OPTIMIZE and ANALYZE statements".
    In 4.1 we disabled logging of slow admin statements. The fix adds an 
    option to enable it back.
    No test case (slow log is not tested in the test suite), but tested
    manually.
    + post-review fixes (word police mainly).
    
    
    sql/mysql_priv.h:
      - declaration for a new option
    sql/mysqld.cc:
      Add server option '--log-slow-admin-statements' to log slow
      optimize/alter/etc statements to the slow log if it's enabled.
      Add warnings that this option works only if the slow log is open.
    sql/sql_class.h:
      Rename 'thd->slow_command' to thd->enable_slow_log (negates
      the meaning of this variable, and so resolves the need to negate
      value opt_log_slow_admin_statements when setting it).
    sql/sql_parse.cc:
      Implement optional logging of administrative statements in the slow log.
    51cd70da
mysql_priv.h 48.2 KB