Skip to content

Commit

Permalink
FB8-76: Add current master host:port to server read only error when a…
Browse files Browse the repository at this point in the history
…vailable (facebook#958) (facebook#958)

Summary:
Jira ticket: https://jira.percona.com/browse/FB8-76

Reference Patch: facebook@270854f
Reference Patch: facebook@9f00827
Reference Patch: facebook@3e50e46
Reference Patch: facebook@9f18725

When a server is in read_only, we append the current master_host and
master_port to the error message, if the server is a slave. The master_host
could be either hostname or ip address, depending on how a slave is connected
to the master.

A new generic error code `ER_OPTION_PREVENTS_STATEMENT_EXTRA_INFO` is added, so
that we can append any additional info to the fixed error message.

Proposing a way to set a custom message in the `--read-only (super)` error.
Note: the variable can only be set when server is in read-only (super) state.

p.s. I am hesitant to add a mutex for the variable, so we will get a snapshot
of the current pointer of the variable (const char*) when printing the error.

Per request, we allow setting read_only_error_msg_extra without being in
read_only state. The custom message can be set/reset at any time.

D61383 added a new error code to allow appending extra info to read_only error
message. The new error code breaks existing dependencies which expects to
receive code 1290. Reverting back to use the old error, and extending the 1290
error message instead of adding a new one. This involves updating many files
(which was the motivation I added a new one in D61383).

Ideally we should have a more elegant solution to send extra info back to
clients, which will be worked on separately. This is to fix the broken
dependencies.
Pull Request resolved: facebook#958

Reviewed By: lloyd

Differential Revision: D14137345

Pulled By: lth
  • Loading branch information
tianx authored and inikep committed May 13, 2024
1 parent 0eebd4d commit ac9529d
Show file tree
Hide file tree
Showing 22 changed files with 202 additions and 48 deletions.
1 change: 1 addition & 0 deletions mysql-test/r/bug58669.result
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ user1@localhost
SHOW VARIABLES LIKE "read_only%";
Variable_name Value
read_only ON
read_only_error_msg_extra
read_only_slave OFF
INSERT INTO db1.t1 VALUES (1);
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
Expand Down
4 changes: 4 additions & 0 deletions mysql-test/r/mysqld--help-notwin.result
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,9 @@ The following options may be given as the first argument:
--read-only Make all non-temporary tables read-only, with the
exception for replication applier threads and users with
the SUPER privilege.
--read-only-error-msg-extra[=name]
Set this variable to print out extra error information,
which will be appended to read_only error messages.
--read-only-slave Blocks disabling read_only if the server is a slave. This
is helpful in asserting that read_only is never disabled
on a slave. Slave with read_only=0 may generate new GTID
Expand Down Expand Up @@ -2600,6 +2603,7 @@ range-alloc-block-size 4096
range-optimizer-max-mem-size 8388608
read-buffer-size 131072
read-only FALSE
read-only-error-msg-extra
read-only-slave TRUE
read-rnd-buffer-size 262144
regexp-stack-limit 8000000
Expand Down
62 changes: 31 additions & 31 deletions mysql-test/suite/rpl_gtid/r/rpl_gtid_while_super_read_only.result
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ ALTER INSTANCE ROTATE BINLOG MASTER KEY;
ALTER INSTANCE RELOAD TLS;
include/gtid_step_assert.inc [count=0, only_count=0]
ALTER INSTANCE ROTATE INNODB MASTER KEY;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
#### 6(a) FLUSH STATEMENTS AND CHECK GTID EXCECUTED
[connection slave]
FLUSH LOGS;
Expand Down Expand Up @@ -218,7 +218,7 @@ SET GTID_NEXT = 'AUTOMATIC';
include/gtid_step_assert.inc [count=1, only_count=1]
SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:3';
START TRANSACTION READ WRITE;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:4';
START TRANSACTION READ ONLY;
COMMIT;
Expand All @@ -242,57 +242,57 @@ PARTITION BY RANGE(c1)
PARTITION p2 VALUES LESS THAN (10));
SET GLOBAL SUPER_READ_ONLY = ON;
CREATE TABLE t_test(c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
CREATE SPATIAL REFERENCE SYSTEM 13001000 NAME 'TEST13001000 Long-Lat WGS 84' DEFINITION 'GEOGCS["Long-Lat WGS 84",DATUM["World Geodetic System 1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.017453292519943278,AUTHORITY["EPSG","9122"]],AXIS["Lon",EAST],AXIS["Lat",NORTH],AUTHORITY["EPSG","4326"]]';
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql
OPTIONS (USER 'Remote', HOST '198.51.100.106', DATABASE 'test');
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undo.dat' INITIAL_SIZE = 10M;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
ALTER TABLE t_part TRUNCATE PARTITION p0, p1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
ALTER TABLE t_hash DISCARD TABLESPACE;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
ALTER TABLE t_hash IMPORT TABLESPACE;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
ALTER TABLE t_hash COALESCE PARTITION 1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
ALTER TABLE t_nopart1 REMOVE PARTITIONING;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
ALTER TABLE t_part EXCHANGE PARTITION sp00 WITH TABLE t_nopart1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
ALTER TABLE t_part REBUILD PARTITION p0;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
ALTER TABLE t_part1 REORGANIZE PARTITION p1,p2 INTO (PARTITION p3 VALUES LESS THAN (300));
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
ALTER TABLE t_part ADD PARTITION (PARTITION p3 VALUES LESS THAN (300));
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
ALTER TABLE t_part DROP PARTITION p3;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
#### 10. [UN]INSTALL [PLUGIN | COMPONENT]
include/gtid_step_reset.inc
include/gtid_step_assert.inc [count=0, only_count=0]
#### 11. [OPTIMIZE | ANALYZE | REPAIR] TABLE
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair Error The MySQL server is running with the --super-read-only option so it cannot execute this statement
test.t1 repair Error The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
test.t1 repair error Corrupt
include/gtid_step_assert.inc [count=1, only_count=0]
ANALYZE TABLE t1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
OPTIMIZE TABLE t1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
#### 12. ALTER TABLE ... [OPTIMIZE | ANALYZE | REPAIR] PARTITION.
include/gtid_step_reset.inc
ALTER TABLE t_part OPTIMIZE PARTITION p0, p1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
include/gtid_step_assert.inc [count=0, only_count=0]
ALTER TABLE t_part ANALYZE PARTITION p0;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
include/gtid_step_assert.inc [count=0, only_count=0]
ALTER TABLE t_part REPAIR PARTITION p0, p1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
include/gtid_step_assert.inc [count=0, only_count=0]
#### 13. Run GRANT, REVOKE, CREATE USER, DROP USER in a way that it
#### fails, e.g., create two users where the second already exists.
Expand All @@ -301,33 +301,33 @@ CREATE USER 'u1'@localhost IDENTIFIED BY '';
SET @@global.super_read_only = 1;
include/gtid_step_reset.inc
CREATE USER u1,u2;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
include/gtid_step_assert.inc [count=0, only_count=0]
GRANT ALL ON *.* To u1,u2;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
include/gtid_step_assert.inc [count=0, only_count=0]
REVOKE ALL ON *.* from u1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
include/gtid_step_assert.inc [count=0, only_count=0]
DROP USER u1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
include/gtid_step_assert.inc [count=0, only_count=0]
DROP USER u1,u2;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
include/gtid_step_assert.inc [count=0, only_count=0]
#### 14. Run DML on mysql.gtid_executed, slave_master_info,
#### slave_relay_log_info, and slave_worker_info tables.
UPDATE mysql.slave_master_info SET Retry_count = Retry_count + 1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
include/gtid_step_assert.inc [count=0, only_count=0]
UPDATE mysql.slave_relay_log_info SET Sql_delay = Sql_delay + 1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
include/gtid_step_assert.inc [count=0, only_count=0]
UPDATE mysql.slave_worker_info SET Relay_log_pos = Relay_log_pos + 1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
include/gtid_step_assert.inc [count=0, only_count=0]
UPDATE mysql.gtid_executed SET interval_end = interval_end + 1;
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement. Current master_host: 127.0.0.1, master_port: MASTER_PORT
include/gtid_step_assert.inc [count=0, only_count=0]
#### 15. Cleanup
SET GLOBAL READ_ONLY = OFF;
Expand Down
33 changes: 33 additions & 0 deletions mysql-test/suite/rpl_gtid/t/rpl_gtid_while_super_read_only.test
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ ALTER INSTANCE RELOAD TLS;
--let $gtid_step_count = 0
--source include/gtid_step_assert.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER INSTANCE ROTATE INNODB MASTER KEY;

Expand Down Expand Up @@ -493,6 +494,7 @@ SET GTID_NEXT = 'AUTOMATIC';
--source include/gtid_step_assert.inc

eval SET GTID_NEXT = '$uuida:3';
--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
START TRANSACTION READ WRITE;

Expand Down Expand Up @@ -528,46 +530,60 @@ PARTITION BY RANGE(c1)
PARTITION p2 VALUES LESS THAN (10));
SET GLOBAL SUPER_READ_ONLY = ON;

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
CREATE TABLE t_test(c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
CREATE SPATIAL REFERENCE SYSTEM 13001000 NAME 'TEST13001000 Long-Lat WGS 84' DEFINITION 'GEOGCS["Long-Lat WGS 84",DATUM["World Geodetic System 1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.017453292519943278,AUTHORITY["EPSG","9122"]],AXIS["Lon",EAST],AXIS["Lat",NORTH],AUTHORITY["EPSG","4326"]]';

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql
OPTIONS (USER 'Remote', HOST '198.51.100.106', DATABASE 'test');

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undo.dat' INITIAL_SIZE = 10M;

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_part TRUNCATE PARTITION p0, p1;

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_hash DISCARD TABLESPACE;

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_hash IMPORT TABLESPACE;

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_hash COALESCE PARTITION 1;

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_nopart1 REMOVE PARTITIONING;

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_part EXCHANGE PARTITION sp00 WITH TABLE t_nopart1;

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_part REBUILD PARTITION p0;

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_part1 REORGANIZE PARTITION p1,p2 INTO (PARTITION p3 VALUES LESS THAN (300));

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_part ADD PARTITION (PARTITION p3 VALUES LESS THAN (300));

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_part DROP PARTITION p3;

Expand All @@ -577,9 +593,11 @@ ALTER TABLE t_part DROP PARTITION p3;
--source include/gtid_step_reset.inc

# behavior changed with "D27213990 allow install/uninstall plugin when enable_super_log_bin_read_only is enabled"
#--replace_result $MASTER_MYPORT MASTER_PORT
#--error ER_OPTION_PREVENTS_STATEMENT
#INSTALL PLUGIN keyring_file SONAME 'keyring_file.so';
#
#--replace_result $MASTER_MYPORT MASTER_PORT
#--error ER_OPTION_PREVENTS_STATEMENT
#UNINSTALL PLUGIN keyring_file;

Expand All @@ -590,14 +608,17 @@ ALTER TABLE t_part DROP PARTITION p3;
--echo #### 11. [OPTIMIZE | ANALYZE | REPAIR] TABLE
########################################################################

--replace_result $MASTER_MYPORT MASTER_PORT
REPAIR TABLE t1;

--let $gtid_step_count = 1
--source include/gtid_step_assert.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ANALYZE TABLE t1;

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
OPTIMIZE TABLE t1;

Expand All @@ -607,16 +628,19 @@ OPTIMIZE TABLE t1;
########################################################################
--source include/gtid_step_reset.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_part OPTIMIZE PARTITION p0, p1;
--let $gtid_step_count = 0
--source include/gtid_step_assert.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_part ANALYZE PARTITION p0;
--let $gtid_step_count = 0
--source include/gtid_step_assert.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t_part REPAIR PARTITION p0, p1;
--let $gtid_step_count = 0
Expand All @@ -631,26 +655,31 @@ CREATE USER 'u1'@localhost IDENTIFIED BY '';
SET @@global.super_read_only = 1;
--source include/gtid_step_reset.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
CREATE USER u1,u2;
--let $gtid_step_count = 0
--source include/gtid_step_assert.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
GRANT ALL ON *.* To u1,u2;
--let $gtid_step_count = 0
--source include/gtid_step_assert.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
REVOKE ALL ON *.* from u1;
--let $gtid_step_count = 0
--source include/gtid_step_assert.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
DROP USER u1;
--let $gtid_step_count = 0
--source include/gtid_step_assert.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
DROP USER u1,u2;
--let $gtid_step_count = 0
Expand All @@ -661,21 +690,25 @@ DROP USER u1,u2;
--echo #### slave_relay_log_info, and slave_worker_info tables.
########################################################################

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
UPDATE mysql.slave_master_info SET Retry_count = Retry_count + 1;
--let $gtid_step_count = 0
--source include/gtid_step_assert.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
UPDATE mysql.slave_relay_log_info SET Sql_delay = Sql_delay + 1;
--let $gtid_step_count = 0
--source include/gtid_step_assert.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
UPDATE mysql.slave_worker_info SET Relay_log_pos = Relay_log_pos + 1;
--let $gtid_step_count = 0
--source include/gtid_step_assert.inc

--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_OPTION_PREVENTS_STATEMENT
UPDATE mysql.gtid_executed SET interval_end = interval_end + 1;
--let $gtid_step_count = 0
Expand Down
Loading

0 comments on commit ac9529d

Please sign in to comment.