mariadb/mysql-test/suite/rpl/r/rpl_gtid_grouping.result
Monty 567c097359 MDEV-33582 Add more warnings to be able to better diagnose network issues
Warnings are added to net_server.cc when
global_system_variables.log_warnings >= 4.

When the above condition holds then:
- All communication errors from net_serv.cc is also written to the
  error log.
- In case of a of not being able to read or write a packet, a more
  detailed error is given.

Other things:
- Added detection of slaves that has hangup to Ack_receiver::run()
- vio_close() is now first marking the socket closed before closing it.
  The reason for this is to ensure that the connection that gets a read
  error can check if the reason was that the socket was closed.
- Add a new state to vio to be able to detect if vio is acive, shutdown or
  closed. This is used to detect if socket is closed by another thread.
- Testing of the new warnings is done in rpl_get_lock.test
- Suppress some of the new warnings in mtr to allow one to run some of
  the tests with -mysqld=--log-warnings=4. All test in the 'rpl' suite
  can now be run with this option.
 - Ensure that global.log_warnings are restored at test end in a way
   that allows one to use mtr --mysqld=--log-warnings=4.

Reviewed-by: <serg@mariadb.org>,<brandon.nesterenko@mariadb.com>
2024-03-05 20:19:49 +02:00

53 lines
1.7 KiB
Text

include/master-slave.inc
[connection master]
connection slave;
call mtr.add_suppression("Unexpected break of being relay-logged GTID 0-27697-1000");
call mtr.add_suppression("Relay log write failure: could not queue event from master");
call mtr.add_suppression("The current group of events starts with a non-GTID");
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
include/start_slave.inc
connection master;
CREATE TABLE t (a INT) ENGINE=innodb;
INSERT INTO t VALUES(1);
### A. Simulate an unnoticeable loss of Xid event
connection slave;
SET @@global.debug_dbug="+d,slave_discard_xid_for_gtid_0_x_1000";
connection master;
SET @@gtid_seq_no=1000;
set @@server_id=27697;
INSERT INTO t VALUES(1000);
set @@server_id=default;
INSERT INTO t VALUES(1001);
## Prove the error occurs.
connection slave;
include/wait_for_slave_io_error.inc [errno=1595]
## Prove the slave recovers after the simulation condtion is lifted.
SET @@global.debug_dbug=default;
include/start_slave.inc
### B. Do the same to GTID event.
connection slave;
SET @@global.debug_dbug="+d,slave_discard_gtid_0_x_1002";
connection master;
SET @@gtid_seq_no=1002;
set @@server_id=27697;
INSERT INTO t VALUES(1002);
set @@server_id=default;
INSERT INTO t VALUES(1003);
## Prove the error occurs.
connection slave;
include/wait_for_slave_io_error.inc [errno=1595]
## Prove the slave recovers after the simulation condtion is lifted.
SET @@global.debug_dbug=default;
include/start_slave.inc
connection master;
connection slave;
include/diff_tables.inc [master:t,slave:t]
"===== Clean up ====="
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=no;
include/start_slave.inc
connection master;
DROP TABLE t;
include/rpl_end.inc