1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-6720 - enable connection log in mysqltest by default

This commit is contained in:
Sergey Vojtovich
2016-03-25 20:51:22 +04:00
parent 5052e2479e
commit 282497dd6d
1559 changed files with 38534 additions and 9891 deletions

View File

@ -1,5 +1,6 @@
include/rpl_init.inc [topology=1->2]
*** Test retry of transactions that fail to replicate due to deadlock or similar temporary error. ***
connection server_1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,1);
@ -11,6 +12,7 @@ RETURN x;
END
||
SET sql_log_bin=1;
connection server_2;
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=5;
@ -30,6 +32,7 @@ END
||
SET sql_log_bin=1;
include/stop_slave.inc
connection server_1;
SET gtid_seq_no = 100;
BEGIN;
INSERT INTO t1 VALUES (2,1);
@ -41,6 +44,7 @@ a b
1 2
2 1
3 1
connection server_2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_gtid_0_x_100";
include/start_slave.inc
@ -54,6 +58,7 @@ a b
3 1
*** Test that double retry works when the first retry also fails with temp error ***
include/stop_slave.inc
connection server_1;
SET gtid_seq_no = 100;
SET @old_server_id = @@server_id;
SET server_id = 10;
@ -72,6 +77,7 @@ a b
4 1
5 1
6 1
connection server_2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_gtid_0_x_100,rpl_parallel_simulate_double_temp_err_gtid_0_x_100";
include/start_slave.inc
@ -88,6 +94,7 @@ a b
6 1
*** Test too many retries, eventually causing failure. ***
include/stop_slave.inc
connection server_1;
SET gtid_seq_no = 100;
SET @old_server_id = @@server_id;
SET server_id = 11;
@ -109,6 +116,7 @@ a b
7 1
8 1
9 1
connection server_2;
SET sql_log_bin=0;
CALL mtr.add_suppression("Slave worker thread retried transaction 10 time\\(s\\) in vain, giving up");
CALL mtr.add_suppression("Slave: Deadlock found when trying to get lock; try restarting transaction");
@ -142,11 +150,14 @@ a b
8 1
9 1
*** Test retry of event group that spans multiple relay log files. ***
connection server_1;
CREATE TABLE t2 (a int PRIMARY KEY, b BLOB) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1,"Hulubullu");
connection server_2;
include/stop_slave.inc
SET @old_max= @@GLOBAL.max_relay_log_size;
SET GLOBAL max_relay_log_size=4096;
connection server_1;
SET gtid_seq_no = 100;
SET @old_server_id = @@server_id;
SET server_id = 12;
@ -162,6 +173,7 @@ a LENGTH(b)
1 9
2 5006
3 5012
connection server_2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_gtid_0_x_100";
include/start_slave.inc
@ -176,7 +188,9 @@ a LENGTH(b)
1 9
2 5006
3 5012
connection server_1;
INSERT INTO t1 VALUES (11,11);
connection server_2;
SELECT * FROM t1 WHERE a >= 10 ORDER BY a;
a b
10 4
@ -189,7 +203,9 @@ a LENGTH(b)
4 5000
SET GLOBAL max_relay_log_size=@old_max;
*** MDEV-7065: Incorrect relay log position in parallel replication after retry of transaction ***
connection server_2;
include/stop_slave.inc
connection server_1;
BEGIN;
INSERT INTO t1 VALUES (100, 0);
INSERT INTO t1 VALUES (101, 0);
@ -202,6 +218,7 @@ a b
101 0
102 0
103 0
connection server_2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
include/start_slave.inc
@ -215,12 +232,14 @@ a b
102 0
103 0
include/stop_slave_sql.inc
connection server_1;
INSERT INTO t1 VALUES (104, 1);
INSERT INTO t1 VALUES (105, 1);
INSERT INTO t1 VALUES (106, 1);
INSERT INTO t1 VALUES (107, 1);
INSERT INTO t1 VALUES (108, 1);
INSERT INTO t1 VALUES (109, 1);
connection server_2;
include/start_slave.inc
SELECT * FROM t1 WHERE a >= 100 ORDER BY a;
a b
@ -235,13 +254,17 @@ a b
108 1
109 1
*** MDEV-6917: Parallel replication: "Commit failed due to failure of an earlier commit on which this one depends", but no prior failure seen **
connection server_1;
CREATE TABLE t3 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
INSERT INTO t3 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
CREATE TABLE t4 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
SET @old_format= @@SESSION.binlog_format;
SET binlog_format='statement';
connection server_2;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=no;
connection server_1;
connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET @old_format= @@SESSION.binlog_format;
SET binlog_format='statement';
BEGIN;
@ -249,7 +272,9 @@ INSERT INTO t4 VALUES (10, foo(1, 'before_execute_sql_command WAIT_FOR t1_start'
UPDATE t3 SET b=NULL WHERE a=6;
SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
COMMIT;
connection server_1;
SET debug_sync='now WAIT_FOR master_queued1';
connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET @old_format= @@SESSION.binlog_format;
SET binlog_format='statement';
BEGIN;
@ -257,7 +282,9 @@ INSERT INTO t4 VALUES (20, foo(2, 'group_commit_waiting_for_prior SIGNAL t2_wait
DELETE FROM t3 WHERE b <= 3;
SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
COMMIT;
connection server_1;
SET debug_sync='now WAIT_FOR master_queued2';
connect con3,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET @old_format= @@SESSION.binlog_format;
SET binlog_format='statement';
BEGIN;
@ -265,12 +292,17 @@ INSERT INTO t4 VALUES (30, foo(3, 'before_execute_sql_command WAIT_FOR t3_start'
INSERT INTO t3 VALUES (7,7);
SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
COMMIT;
connection server_1;
SET debug_sync='now WAIT_FOR master_queued3';
SET debug_sync='now SIGNAL master_cont1';
connection con1;
SET binlog_format=@old_format;
connection con2;
SET binlog_format=@old_format;
connection con3;
SET debug_sync='RESET';
SET binlog_format=@old_format;
connection server_1;
SELECT * FROM t3 ORDER BY a;
a b
1 NULL
@ -279,6 +311,7 @@ a b
5 NULL
6 NULL
7 7
connection server_2;
SET @old_dbug=@@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,thd_need_ordering_with_force";
include/start_slave.inc
@ -298,10 +331,13 @@ a b
5 NULL
6 NULL
7 7
connection server_1;
SET binlog_format=@old_format;
connection server_2;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc
connection server_1;
DROP TABLE t1, t2, t3, t4;
DROP function foo;
include/rpl_end.inc