mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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.
This commit is contained in:
@@ -76,6 +76,21 @@ 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));;
|
||||
SELECT sql_text FROM mysql.slow_log WHERE sql_text like 'INSERT INTO t1 values(1, sleep(3))';
|
||||
sql_text
|
||||
SET @@global.log_slow_slave_statements = on;
|
||||
INSERT INTO t1 values(1, sleep(3));;
|
||||
SELECT sql_text FROM mysql.slow_log WHERE sql_text like 'INSERT INTO t1 values(1, sleep(3))';
|
||||
sql_text
|
||||
INSERT INTO t1 values(1, sleep(3))
|
||||
SET @@global.log_output= @old_log_output;
|
||||
SET @@global.long_query_time= @old_long_query_time;
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -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';
|
||||
|
||||
-- connection master
|
||||
SET @@global.log_output= @old_log_output;
|
||||
SET @@global.long_query_time= @old_long_query_time;
|
||||
|
||||
Reference in New Issue
Block a user