Skip to content

Commit d665420

Browse files
author
Sujatha Sivakumar
committed
Bug#26414532: MYSQLRPLSYNC ERRORS OUT BECAUSE SLAVE IS USING
--SUPER-READ-ONLY OPTION Post push fix to address test issue.
1 parent a02da6b commit d665420

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ Warnings:
33
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
44
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
55
[connection master]
6+
include/rpl_reset.inc
67
[connection slave]
78
call mtr.add_suppression("You need to use --log-bin*");
89
SET @saved_value_super= @@GLOBAL.super_read_only;
910
SET @saved_value= @@GLOBAL.read_only;
1011
SET GLOBAL super_read_only= 1;
12+
include/assert.inc ['gtid_executed_compression_period global variable is set to 5']
1113
[connection master]
1214
CREATE TABLE t1(a INT) ENGINE=INNODB;
1315
INSERT INTO t1 VALUES(1);
@@ -17,7 +19,12 @@ INSERT INTO t1 VALUES(4);
1719
DROP TABLE t1;
1820
include/sync_slave_sql_with_master.inc
1921
#
20-
# Verify that gtid_executed table has MASTER_UUID:1:6
22+
# connection slave
23+
#
24+
include/assert.inc [committed gtids MASTER_UUID:1-6]
25+
#
26+
# Wait till gtid_executed table has one row and verify that
27+
# it is MASTER_UUID:1:6
2128
#
2229
SELECT * FROM mysql.gtid_executed;
2330
source_uuid interval_start interval_end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--skip-log-bin --gtid_executed_compression_period=5
1+
--skip-log-bin --gtid_executed_compression_period=5 --log-slave-updates=false

mysql-test/suite/rpl/t/rpl_gtid_compress_thd_ignore_super_read_only.test

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,18 @@
3333
# to rerun it for every format.
3434
--source include/have_binlog_format_row.inc
3535
--source include/master-slave.inc
36+
# Clear gtid_executed table.
37+
--source include/rpl_reset.inc
3638

3739
--source include/rpl_connection_slave.inc
3840
call mtr.add_suppression("You need to use --log-bin*");
3941
SET @saved_value_super= @@GLOBAL.super_read_only;
4042
SET @saved_value= @@GLOBAL.read_only;
4143
SET GLOBAL super_read_only= 1;
44+
--let $assert_cond = "[SELECT @@GLOBAL.gtid_executed_compression_period]" = 5
45+
--let $assert_text = 'gtid_executed_compression_period global variable is set to 5'
46+
--source include/assert.inc
47+
4248

4349
--source include/rpl_connection_master.inc
4450
--let $master_uuid= `SELECT @@GLOBAL.SERVER_UUID`
@@ -51,8 +57,18 @@ DROP TABLE t1;
5157
--source include/sync_slave_sql_with_master.inc
5258

5359
--echo #
54-
--echo # Verify that gtid_executed table has MASTER_UUID:1:6
60+
--echo # connection slave
61+
--echo #
62+
--let $assert_text= committed gtids MASTER_UUID:1-6
63+
--let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "$master_uuid:1-6"
64+
--source include/assert.inc
65+
66+
--echo #
67+
--echo # Wait till gtid_executed table has one row and verify that
68+
--echo # it is MASTER_UUID:1:6
5569
--echo #
70+
let $wait_condition = SELECT count(*) = 1 FROM mysql.gtid_executed;
71+
--source include/wait_condition.inc
5672
--replace_result $master_uuid MASTER_UUID
5773
SELECT * FROM mysql.gtid_executed;
5874

0 commit comments

Comments
 (0)