Debian Codegraph @

mysql-test/suite/rpl/r/rpl_slow_query_log.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
7 call mtr.add_suppression("Replica SQL.*Request to stop replica SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
8 include/stop_slave.inc
9 SET @old_log_output= @@log_output;
10 SET GLOBAL log_output= 'TABLE';
11 SET @old_long_query_time= @@long_query_time;
12 SET GLOBAL long_query_time= 2;
13 TRUNCATE mysql.slow_log;
14 include/start_slave.inc
15 CREATE TABLE t1 (a int, b int);
16 INSERT INTO t1 values(1, 1);
17 INSERT INTO t1 values(1, sleep(3));
18 include/sync_slave_sql_with_master.inc
19 TRUNCATE mysql.slow_log;
20 SELECT 1, sleep(3);
21 1 sleep(3)
22 1 0
23 SELECT 1;
24 1
25 1
26 TRUNCATE mysql.slow_log;
27 SET TIMESTAMP= 1;
28 SELECT 2, sleep(3);
29 2 sleep(3)
30 2 0
31 SELECT 2;
32 2
33 2
34 TRUNCATE mysql.slow_log;
35 SET @old_slow_query_log= @@slow_query_log;
36 SET GLOBAL slow_query_log= 'OFF';
37 SELECT 3, sleep(3);
38 3 sleep(3)
39 3 0
40 SELECT 3;
41 3
42 3
43 TRUNCATE mysql.slow_log;
44 SET GLOBAL slow_query_log= @old_slow_query_log;
45 DROP TABLE t1;
46 include/sync_slave_sql_with_master.inc
47 include/stop_slave.inc
48 SET GLOBAL long_query_time= @old_long_query_time;
49 SET GLOBAL log_output= @old_log_output;
50 include/start_slave.inc
51 include/rpl_reset.inc
52 SET @old_log_output= @@log_output;
53 SET GLOBAL log_output= 'TABLE';
54 SET GLOBAL long_query_time= 2;
55 SET @old_long_query_time= @@long_query_time;
56 SET SESSION long_query_time= 2;
57 TRUNCATE mysql.slow_log;
58 include/stop_slave.inc
59 SET @old_log_output= @@log_output;
60 SET GLOBAL log_output= 'TABLE';
61 SET @old_long_query_time= @@long_query_time;
62 SET GLOBAL long_query_time= 2;
63 TRUNCATE mysql.slow_log;
64 include/start_slave.inc
65 CREATE TABLE t1 (a int, b int);
66 ********************************************************************
67 **** INSERT one row that exceeds long_query_time
68 **** Outcome: query ends up in both master and slave slow log
69 ********************************************************************
70 INSERT INTO t1 values(1, sleep(3));
71 include/sync_slave_sql_with_master.inc
72 ### Assertion is good. Both Master and Slave exhibit the
73 ### same number of queries in slow log: 1
74 TRUNCATE mysql.slow_log;
75 TRUNCATE mysql.slow_log;
76 ********************************************************************
77 **** Now do inserts again, but first add an index to the table.
78 **** Outcome: Note that the slave contains the same one entry (as
79 **** the master does) whereas before the patch it did not.
80 ********************************************************************
81 ALTER TABLE t1 ADD INDEX id1(a);
82 INSERT INTO t1 values(1, sleep(3));
83 include/sync_slave_sql_with_master.inc
84 ### Assertion is good. Both Master and Slave exhibit the
85 ### same number of queries in slow log: 1
86 ********************************************************************
87 **** TRUNCATE the slow log then check whether runtime changes of
88 **** log_slow_replica_statements work without slave restart.
89 ********************************************************************
90 SET @old_log_slow_replica_statements= @@global.log_slow_replica_statements;
91 SET @@global.log_slow_replica_statements = off;
92 TRUNCATE mysql.slow_log;
93 INSERT INTO t1 values(1, sleep(3));;
94 include/sync_slave_sql_with_master.inc
95 SET @@global.log_slow_replica_statements = on;
96 INSERT INTO t1 values(1, sleep(3));;
97 include/sync_slave_sql_with_master.inc
98 SET @@global.log_output= @old_log_output;
99 SET @@global.long_query_time= @old_long_query_time;
100 TRUNCATE TABLE mysql.slow_log;
101 TRUNCATE TABLE mysql.general_log;
102 DROP TABLE t1;
103 include/sync_slave_sql_with_master.inc
104 SET @@global.log_output= @old_log_output;
105 TRUNCATE TABLE mysql.general_log;
106 SET @@global.long_query_time= @old_long_query_time;
107 SET @@global.log_slow_replica_statements= @old_log_slow_replica_statements;
108 include/rpl_end.inc