mariadb/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa.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

50 lines
1.8 KiB
Text

include/master-slave.inc
[connection master]
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
call mtr.add_suppression("WSREP: handlerton rollback failed");
CREATE VIEW v_processlist as SELECT * FROM performance_schema.threads where type = 'FOREGROUND';
connection master;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
connection slave;
include/stop_slave.inc
SET @old_parallel_threads = @@GLOBAL.slave_parallel_threads;
SET @@global.slave_parallel_threads = 7;
SET @old_parallel_mode = @@GLOBAL.slave_parallel_mode;
SET @@global.slave_parallel_mode ='optimistic';
SET @old_gtid_cleanup_batch_size = @@GLOBAL.gtid_cleanup_batch_size;
SET @@global.gtid_cleanup_batch_size = 1000000;
CHANGE MASTER TO master_use_gtid=slave_pos;
connection master;
CREATE TABLE t0 (a int, b INT) ENGINE=InnoDB;
CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, 0);
include/save_master_gtid.inc
connection slave;
include/start_slave.inc
include/sync_with_master_gtid.inc
include/stop_slave.inc
connection master;
include/save_master_gtid.inc
connection slave;
include/start_slave.inc
include/sync_with_master_gtid.inc
include/diff_tables.inc [master:t0, slave:t0]
include/diff_tables.inc [master:t1, slave:t1]
connection slave;
include/stop_slave.inc
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc
connection master;
DROP VIEW v_processlist;
DROP TABLE t0, t1;
include/save_master_gtid.inc
connection slave;
include/sync_with_master_gtid.inc
SELECT COUNT(*) <= 5*@@GLOBAL.gtid_cleanup_batch_size
FROM mysql.gtid_slave_pos;
COUNT(*) <= 5*@@GLOBAL.gtid_cleanup_batch_size
1
SET GLOBAL gtid_cleanup_batch_size= @old_gtid_cleanup_batch_size;
connection master;
include/rpl_end.inc