1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +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,15 +1,23 @@
include/master-slave.inc
[connection master]
connection master;
set @old_master_binlog_checksum= @@global.binlog_checksum;
set @old_slave_dbug= @@global.debug_dbug;
connection slave;
include/stop_slave.inc
# Test slave with no capability gets dummy event, which is ignored.
SET @@global.debug_dbug='+d,simulate_slave_capability_none';
include/start_slave.inc
connection master;
FLUSH LOGS;
CREATE TABLE t1 (a INT PRIMARY KEY);
INSERT INTO t1 VALUES (0);
connection slave;
connection master;
ALTER TABLE t1 ORDER BY a;
connection slave;
connection slave;
connection master;
SET SESSION binlog_annotate_row_events = ON;
DELETE FROM t1;
INSERT INTO t1 /* A comment just to make the annotate event sufficiently long that the dummy event will need to get padded with spaces so that we can test that this works */ VALUES(1);
@ -25,6 +33,8 @@ master-bin.000002 # Annotate_rows # # INSERT INTO t1 /* A comment just to make t
master-bin.000002 # Table_map # # table_id: # (test.t1)
master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000002 # Query # # COMMIT
connection slave;
connection slave;
SELECT * FROM t1;
a
1
@ -42,6 +52,7 @@ slave-relay-bin.000005 # Write_rows_v1 # # table_id: # flags: STMT_END_F
slave-relay-bin.000005 # Query # # COMMIT
set @@global.debug_dbug= @old_slave_dbug;
# Test dummy event is checksummed correctly.
connection master;
set @@global.binlog_checksum = CRC32;
TRUNCATE t1;
INSERT INTO t1 VALUES(2);
@ -52,6 +63,8 @@ master-bin.000003 # Annotate_rows # # INSERT INTO t1 VALUES(2)
master-bin.000003 # Table_map # # table_id: # (test.t1)
master-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000003 # Query # # COMMIT
connection slave;
connection slave;
SELECT * FROM t1;
a
2
@ -63,16 +76,24 @@ slave-relay-bin.000007 # Table_map # # table_id: # (test.t1)
slave-relay-bin.000007 # Write_rows_v1 # # table_id: # flags: STMT_END_F
slave-relay-bin.000007 # Query # # COMMIT
*** MDEV-5754: MySQL 5.5 slaves cannot replicate from MariaDB 10.0 ***
connection master;
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
INSERT INTO t2 VALUES (1);
connection master;
SET debug_sync='now WAIT_FOR master_queued1';
connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
INSERT INTO t2 VALUES (2);
connection master;
SET debug_sync='now WAIT_FOR master_queued2';
SET debug_sync='now SIGNAL master_cont1';
connection con1;
SET debug_sync='RESET';
connection con2;
SET debug_sync='RESET';
connection master;
SET debug_sync='RESET';
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@ -84,6 +105,7 @@ master-bin.000003 # Gtid # # BEGIN GTID #-#-# cid=#
master-bin.000003 # Table_map # # table_id: # (test.t2)
master-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000003 # Xid # # COMMIT /* XID */
connection slave;
SELECT * FROM t2 ORDER BY a;
a
1
@ -93,7 +115,11 @@ a
include/stop_slave.inc
SET @@global.debug_dbug='+d,simulate_slave_capability_old_53';
include/start_slave.inc
connection master;
ALTER TABLE t1 ORDER BY a;
connection slave;
connection slave;
connection master;
UPDATE t1 SET a = 3;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@ -102,6 +128,8 @@ master-bin.000003 # Annotate_rows # # UPDATE t1 SET a = 3
master-bin.000003 # Table_map # # table_id: # (test.t1)
master-bin.000003 # Update_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000003 # Query # # COMMIT
connection slave;
connection slave;
SELECT * FROM t1;
a
3
@ -120,6 +148,8 @@ select @@global.replicate_annotate_row_events;
0
set @@global.debug_dbug= @old_slave_dbug;
Clean up.
connection master;
set @@global.binlog_checksum = @old_master_binlog_checksum;
DROP TABLE t1, t2;
connection slave;
include/rpl_end.inc