Hi, Alexey! On Mar 21, Alexey Botchkov wrote:
revision-id: 8d675d5764e7d8ecad19fafdd167bee9a41d1dc7 (mariadb-10.1.12-27-g8d675d5) parent(s): 94768542115289272996f6450b7d3cafa75dcead committer: Alexey Botchkov timestamp: 2016-03-21 13:02:09 +0400 message:
MDEV-6058 MySQL Bug #11766693: LOG-SLOW-ADMIN-STATEMENTS AND LOG-SLOW-SLAVE-STATEMENTS NOT DISPLAYED. These parameters were moved from the command line options to the system variables section. Treatment of the opt_log_slow_slave_statements changed to let the dynamic change of the variable.
Thanks! Looks good, just one question:
diff --git a/mysql-test/suite/rpl/r/rpl_slow_query_log.result b/mysql-test/suite/rpl/r/rpl_slow_query_log.result index 79b83b4..871722e 100644 --- a/mysql-test/suite/rpl/r/rpl_slow_query_log.result +++ b/mysql-test/suite/rpl/r/rpl_slow_query_log.result @@ -76,6 +76,18 @@ ALTER TABLE t1 ADD INDEX id1(a); INSERT INTO t1 values(1, sleep(3)); ### Assertion is good. Both Master and Slave exhibit the ### same number of queries in slow log: 1 +******************************************************************** +**** TRUNCATE the slow log then check whether runtime changes of +**** log_slow_slave_statements work without slave restart. +******************************************************************** +SET @old_log_slow_slave_statements= @@global.log_slow_slave_statements; +SET @@global.log_slow_slave_statements = off; +TRUNCATE mysql.slow_log; +INSERT INTO t1 values(1, sleep(3));; +0 +SET @@global.log_slow_slave_statements = on; +INSERT INTO t1 values(1, sleep(3));; +1 SET @@global.log_output= @old_log_output; SET @@global.long_query_time= @old_long_query_time; DROP TABLE t1; diff --git a/mysql-test/suite/rpl/t/rpl_slow_query_log.test b/mysql-test/suite/rpl/t/rpl_slow_query_log.test index faf037a..3505883 100644 --- a/mysql-test/suite/rpl/t/rpl_slow_query_log.test +++ b/mysql-test/suite/rpl/t/rpl_slow_query_log.test @@ -299,6 +299,39 @@ if ($master_slow_query == $slave_slow_query) -- echo ### same number of queries in slow log: $master_slow_query }
+-- echo ******************************************************************** +-- echo **** TRUNCATE the slow log then check whether runtime changes of +-- echo **** log_slow_slave_statements work without slave restart. +-- echo ******************************************************************** + +SET @old_log_slow_slave_statements= @@global.log_slow_slave_statements; +SET @@global.log_slow_slave_statements = off; +TRUNCATE mysql.slow_log; + +-- connection master + +--disable_warnings +-- eval $slow_query; +--enable_warnings +sync_slave_with_master; + +-- connection slave + +eval SELECT sql_text FROM mysql.slow_log WHERE sql_text like '$slow_query'; + +SET @@global.log_slow_slave_statements = on; + +-- connection master + +--disable_warnings +-- eval $slow_query; +--enable_warnings +sync_slave_with_master; + +-- connection slave + +eval SELECT sql_text FROM mysql.slow_log WHERE sql_text like '$slow_query';
Did you run this test? It seems the result doesn't match the test. The result looks like as if you'd have eval SELECT COUNT(*) FROM ... Please, run the full test suite before pushing.
+ -- connection master SET @@global.log_output= @old_log_output; SET @@global.long_query_time= @old_long_query_time;
Regards, Sergei Chief Architect MariaDB and security@mariadb.org