Commit 485ece6d authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

MDEV-8429: Change binlog_checksum default to match MySQL 5.6.6+

parent f6a7c1c7
...@@ -1651,7 +1651,7 @@ FLUSH LOGS; ...@@ -1651,7 +1651,7 @@ FLUSH LOGS;
--echo # --echo #
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001 --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo # --echo #
...@@ -1731,7 +1731,7 @@ FLUSH LOGS; ...@@ -1731,7 +1731,7 @@ FLUSH LOGS;
--echo # --echo #
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001 --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo # --echo #
...@@ -1854,7 +1854,7 @@ FLUSH LOGS; ...@@ -1854,7 +1854,7 @@ FLUSH LOGS;
--echo # --echo #
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001 --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo # --echo #
...@@ -1912,7 +1912,7 @@ FLUSH LOGS; ...@@ -1912,7 +1912,7 @@ FLUSH LOGS;
--echo # --echo #
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001 --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo # --echo #
......
This diff is collapsed.
...@@ -1143,7 +1143,7 @@ big-tables FALSE ...@@ -1143,7 +1143,7 @@ big-tables FALSE
bind-address (No default value) bind-address (No default value)
binlog-annotate-row-events FALSE binlog-annotate-row-events FALSE
binlog-cache-size 32768 binlog-cache-size 32768
binlog-checksum NONE binlog-checksum CRC32
binlog-commit-wait-count 0 binlog-commit-wait-count 0
binlog-commit-wait-usec 100000 binlog-commit-wait-usec 100000
binlog-direct-non-transactional-updates FALSE binlog-direct-non-transactional-updates FALSE
......
set sql_mode=""; set sql_mode="";
set global binlog_checksum=NONE;
drop table if exists t1; drop table if exists t1;
reset master; reset master;
set @a=UNIX_TIMESTAMP("2020-01-21 15:32:22"); set @a=UNIX_TIMESTAMP("2020-01-21 15:32:22");
...@@ -1627,3 +1628,4 @@ ROLLBACK /* added by mysqlbinlog */; ...@@ -1627,3 +1628,4 @@ ROLLBACK /* added by mysqlbinlog */;
--- end of test -- --- end of test --
drop table t1; drop table t1;
set global binlog_checksum=default;
...@@ -509,6 +509,7 @@ master-bin.000001 # Query # # COMMIT ...@@ -509,6 +509,7 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@' master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Rotate # # master-bin.000002;pos=POS
drop table t1,t2,t3,tt1; drop table t1,t2,t3,tt1;
reset master; reset master;
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
-- source include/binlog_start_pos.inc -- source include/binlog_start_pos.inc
set sql_mode=""; set sql_mode="";
set global binlog_checksum=NONE;
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings
...@@ -185,4 +186,5 @@ select "--- end of test --" as ""; ...@@ -185,4 +186,5 @@ select "--- end of test --" as "";
--enable_query_log --enable_query_log
drop table t1; drop table t1;
set global binlog_checksum=default;
# End of 4.1 tests # End of 4.1 tests
...@@ -453,5 +453,5 @@ DROP TABLE t1dec102; ...@@ -453,5 +453,5 @@ DROP TABLE t1dec102;
flush logs; flush logs;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/ --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001 --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
...@@ -150,7 +150,7 @@ FLUSH LOGS; ...@@ -150,7 +150,7 @@ FLUSH LOGS;
--echo # --echo #
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001 --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo # --echo #
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
--disable_query_log --disable_query_log
set sql_mode=""; set sql_mode="";
set global binlog_checksum=NONE;
# Fix timestamp to avoid varying results # Fix timestamp to avoid varying results
SET timestamp=1000000000; SET timestamp=1000000000;
...@@ -182,6 +183,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; ...@@ -182,6 +183,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
# Clean-up # Clean-up
--disable_query_log --disable_query_log
set global binlog_checksum=default;
DROP DATABASE test1; DROP DATABASE test1;
DROP DATABASE test2; DROP DATABASE test2;
DROP DATABASE test3; DROP DATABASE test3;
......
...@@ -59,7 +59,7 @@ flush logs; ...@@ -59,7 +59,7 @@ flush logs;
--echo # --echo #
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ --replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows --rewrite-db="test1->new_test1" --rewrite-db="test3->new_test3" -v -v $MYSQLD_DATADIR/master-bin.000001 --exec $MYSQL_BINLOG --base64-output=decode-rows --rewrite-db="test1->new_test1" --rewrite-db="test3->new_test3" -v -v $MYSQLD_DATADIR/master-bin.000001
--echo # --echo #
...@@ -70,7 +70,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; ...@@ -70,7 +70,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--echo # --read-from-remote-server --echo # --read-from-remote-server
--echo # --echo #
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ --replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows --rewrite-db="test1->new_test1" --rewrite-db="test3->new_test3" -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001 --exec $MYSQL_BINLOG --base64-output=decode-rows --rewrite-db="test1->new_test1" --rewrite-db="test3->new_test3" -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
DROP DATABASE test1; DROP DATABASE test1;
......
...@@ -16,7 +16,7 @@ connect(con4,localhost,root,,); ...@@ -16,7 +16,7 @@ connect(con4,localhost,root,,);
connection default; connection default;
CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb; CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb;
let pos=`select $binlog_start_pos + 238`; let pos=`select $binlog_start_pos + 254`;
--replace_result $pos <pos> --replace_result $pos <pos>
SHOW MASTER STATUS; SHOW MASTER STATUS;
--replace_result $pos <pos> --replace_result $pos <pos>
...@@ -53,10 +53,10 @@ COMMIT; ...@@ -53,10 +53,10 @@ COMMIT;
connection default; connection default;
SELECT * FROM t1 ORDER BY a,b; SELECT * FROM t1 ORDER BY a,b;
let pos=`select $binlog_start_pos + 740`; let pos=`select $binlog_start_pos + 788`;
--replace_result $pos <pos> --replace_result $pos <pos>
SHOW STATUS LIKE 'binlog_snapshot_%'; SHOW STATUS LIKE 'binlog_snapshot_%';
let pos=`select $binlog_start_pos + 1092`; let pos=`select $binlog_start_pos + 1164`;
--replace_result $pos <pos> --replace_result $pos <pos>
SHOW MASTER STATUS; SHOW MASTER STATUS;
SELECT * FROM t2 ORDER BY a; SELECT * FROM t2 ORDER BY a;
...@@ -74,10 +74,10 @@ FLUSH LOGS; ...@@ -74,10 +74,10 @@ FLUSH LOGS;
connection default; connection default;
SELECT * FROM t1 ORDER BY a,b; SELECT * FROM t1 ORDER BY a,b;
let pos=`select $binlog_start_pos + 740`; let pos=`select $binlog_start_pos + 788`;
--replace_result $pos <pos> --replace_result $pos <pos>
SHOW STATUS LIKE 'binlog_snapshot_%'; SHOW STATUS LIKE 'binlog_snapshot_%';
let pos=`select $binlog_start_pos + 119`; let pos=`select $binlog_start_pos + 131`;
--replace_result $pos <pos> --replace_result $pos <pos>
SHOW MASTER STATUS; SHOW MASTER STATUS;
COMMIT; COMMIT;
......
...@@ -97,7 +97,7 @@ SELECT * FROM t1 ORDER BY a; ...@@ -97,7 +97,7 @@ SELECT * FROM t1 ORDER BY a;
# for the end of the second transaction (as can be checked with # for the end of the second transaction (as can be checked with
# mysqlbinlog). # mysqlbinlog).
let $MYSQLD_DATADIR= `SELECT @@datadir`; let $MYSQLD_DATADIR= `SELECT @@datadir`;
let pos=`select $binlog_start_pos + 678`; let pos=`select $binlog_start_pos + 730`;
--replace_result $pos <pos> --replace_result $pos <pos>
--exec grep 'InnoDB: Last MySQL binlog file position' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1 --exec grep 'InnoDB: Last MySQL binlog file position' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1
......
...@@ -98,7 +98,7 @@ SELECT * FROM t1 ORDER BY a; ...@@ -98,7 +98,7 @@ SELECT * FROM t1 ORDER BY a;
# for the end of the second transaction (as can be checked with # for the end of the second transaction (as can be checked with
# mysqlbinlog). # mysqlbinlog).
let $MYSQLD_DATADIR= `SELECT @@datadir`; let $MYSQLD_DATADIR= `SELECT @@datadir`;
let pos=`select $binlog_start_pos + 678`; let pos=`select $binlog_start_pos + 730`;
--replace_result $pos <pos> --replace_result $pos <pos>
--exec grep 'InnoDB: Last MySQL binlog file position' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1 --exec grep 'InnoDB: Last MySQL binlog file position' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
......
...@@ -137,10 +137,10 @@ let $field= Slave_IO_State; ...@@ -137,10 +137,10 @@ let $field= Slave_IO_State;
let $condition= = 'Waiting for master to send event'; let $condition= = 'Waiting for master to send event';
--source include/wait_show_condition.inc --source include/wait_show_condition.inc
let read_master_log_pos=`select $binlog_start_pos + 65`; let read_master_log_pos=`select $binlog_start_pos + 73`;
let relay_log_pos=`select 2*$binlog_start_pos + 105`; let relay_log_pos=`select 2*$binlog_start_pos + 117`;
let relay_log_space1=`select 3*$binlog_start_pos + 144`; let relay_log_space1=`select 3*$binlog_start_pos + 160`;
let relay_log_space2=`select 3*$binlog_start_pos + 163`; let relay_log_space2=`select 3*$binlog_start_pos + 179`;
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space1 <relay_log_space1> $relay_log_space2 <relay_log_space2> --replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space1 <relay_log_space1> $relay_log_space2 <relay_log_space2>
show all slaves status; show all slaves status;
...@@ -164,9 +164,9 @@ let $condition= = 'Waiting for master to send event'; ...@@ -164,9 +164,9 @@ let $condition= = 'Waiting for master to send event';
--source include/wait_show_condition.inc --source include/wait_show_condition.inc
let relay_log_pos=`select 2*$binlog_start_pos + 40`; let relay_log_pos=`select 2*$binlog_start_pos + 44`;
let relay_log_space1=`select 3*$binlog_start_pos + 79`; let relay_log_space1=`select 3*$binlog_start_pos + 87`;
let relay_log_space2=`select 3*$binlog_start_pos + 98`; let relay_log_space2=`select 3*$binlog_start_pos + 106`;
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space1 <relay_log_space1> $relay_log_space2 <relay_log_space2> --replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space1 <relay_log_space1> $relay_log_space2 <relay_log_space2>
show all slaves status; show all slaves status;
......
...@@ -222,7 +222,7 @@ flush logs; ...@@ -222,7 +222,7 @@ flush logs;
--connection master1 --connection master1
purge binary logs to 'master-bin.000002'; purge binary logs to 'master-bin.000002';
let filesize=`select $binlog_start_pos+119`; let filesize=`select $binlog_start_pos+131`;
--replace_result $filesize filesize --replace_result $filesize filesize
show binary logs; show binary logs;
insert into t1 (f1) values ('four'); insert into t1 (f1) values ('four');
......
...@@ -39,9 +39,9 @@ stop slave 'master1'; ...@@ -39,9 +39,9 @@ stop slave 'master1';
--let $datadir = `SELECT @@datadir` --let $datadir = `SELECT @@datadir`
let read_master_log_pos=`select $binlog_start_pos + 554`; let read_master_log_pos=`select $binlog_start_pos + 590`;
let relay_log_pos=`select 2*$binlog_start_pos + 594`; let relay_log_pos=`select 2*$binlog_start_pos + 634`;
let relay_log_space=`select 3*$binlog_start_pos + 652`; let relay_log_space=`select 3*$binlog_start_pos + 696`;
--replace_result $SERVER_MYPORT_1 MYPORT_1 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space <relay_log_space> --replace_result $SERVER_MYPORT_1 MYPORT_1 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space <relay_log_space>
show slave 'master1' status; show slave 'master1' status;
--list_files $datadir mysqld* --list_files $datadir mysqld*
......
...@@ -41,10 +41,10 @@ let $condition = = 7; ...@@ -41,10 +41,10 @@ let $condition = = 7;
let $wait_for_all = 1; let $wait_for_all = 1;
--source include/wait_show_condition.inc --source include/wait_show_condition.inc
let read_master_log_pos=`select $binlog_start_pos + 65`; let read_master_log_pos=`select $binlog_start_pos + 73`;
let relay_log_pos=`select 2*$binlog_start_pos + 105`; let relay_log_pos=`select 2*$binlog_start_pos + 117`;
let relay_log_space1=`select 3*$binlog_start_pos + 162`; let relay_log_space1=`select 3*$binlog_start_pos + 178`;
let relay_log_space2=`select 3*$binlog_start_pos + 162`; let relay_log_space2=`select 3*$binlog_start_pos + 178`;
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space1 <relay_log_space1> $relay_log_space2 <relay_log_space2> --replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space1 <relay_log_space1> $relay_log_space2 <relay_log_space2>
show all slaves status; show all slaves status;
......
...@@ -41,7 +41,7 @@ master-bin.000002 # ...@@ -41,7 +41,7 @@ master-bin.000002 #
set @@global.binlog_checksum = default; set @@global.binlog_checksum = default;
select @@global.binlog_checksum; select @@global.binlog_checksum;
@@global.binlog_checksum @@global.binlog_checksum
NONE CRC32
set @@global.binlog_checksum = CRC32; set @@global.binlog_checksum = CRC32;
select @@global.binlog_checksum; select @@global.binlog_checksum;
@@global.binlog_checksum @@global.binlog_checksum
......
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
connection master;
SET GLOBAL BINLOG_CHECKSUM=NONE;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=NONE;
*** Test MDEV-6120, output of current GTID when a replication error is logged to the errorlog *** *** Test MDEV-6120, output of current GTID when a replication error is logged to the errorlog ***
connection master; connection master;
CREATE TABLE t1(a INT PRIMARY KEY); CREATE TABLE t1(a INT PRIMARY KEY);
...@@ -49,4 +53,9 @@ FOUND /Slave SQL: Error 'Duplicate entry .* on query\. .*Query: '.*', Gtid 0-1-1 ...@@ -49,4 +53,9 @@ FOUND /Slave SQL: Error 'Duplicate entry .* on query\. .*Query: '.*', Gtid 0-1-1
FOUND /Slave SQL: The incident LOST_EVENTS occurred on the master\. Message: <none>, Internal MariaDB error code: 1590/ in mysqld.2.err FOUND /Slave SQL: The incident LOST_EVENTS occurred on the master\. Message: <none>, Internal MariaDB error code: 1590/ in mysqld.2.err
connection master; connection master;
DROP TABLE t1; DROP TABLE t1;
connection master;
SET GLOBAL BINLOG_CHECKSUM=default;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=default;
connection master;
include/rpl_end.inc include/rpl_end.inc
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
connection master;
SET GLOBAL BINLOG_CHECKSUM=none;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=none;
connection master;
**** On Master **** **** On Master ****
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t1 VALUES (1),(2),(3);
...@@ -38,4 +43,9 @@ include/check_slave_is_running.inc ...@@ -38,4 +43,9 @@ include/check_slave_is_running.inc
connection master; connection master;
DROP TABLE t1; DROP TABLE t1;
connection slave; connection slave;
connection master;
SET GLOBAL BINLOG_CHECKSUM=default;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=default;
connection master;
include/rpl_end.inc include/rpl_end.inc
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
connection master;
SET GLOBAL BINLOG_CHECKSUM=NONE;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=NONE;
connection master;
**** On Master **** **** On Master ****
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t1 VALUES (1),(2),(3);
...@@ -23,6 +28,12 @@ show binary logs; ...@@ -23,6 +28,12 @@ show binary logs;
Log_name File_size Log_name File_size
master-bin.000001 # master-bin.000001 #
master-bin.000002 # master-bin.000002 #
master-bin.000003 #
DROP TABLE t1; DROP TABLE t1;
connection slave; connection slave;
connection master;
SET GLOBAL BINLOG_CHECKSUM=default;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=default;
connection master;
include/rpl_end.inc include/rpl_end.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/master-slave.inc --source include/master-slave.inc
connection master;
SET GLOBAL BINLOG_CHECKSUM=NONE;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=NONE;
--echo *** Test MDEV-6120, output of current GTID when a replication error is logged to the errorlog *** --echo *** Test MDEV-6120, output of current GTID when a replication error is logged to the errorlog ***
--connection master --connection master
CREATE TABLE t1(a INT PRIMARY KEY); CREATE TABLE t1(a INT PRIMARY KEY);
...@@ -73,4 +78,9 @@ if(!$log_error_) ...@@ -73,4 +78,9 @@ if(!$log_error_)
--connection master --connection master
DROP TABLE t1; DROP TABLE t1;
connection master;
SET GLOBAL BINLOG_CHECKSUM=default;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=default;
connection master;
--source include/rpl_end.inc --source include/rpl_end.inc
--source include/master-slave.inc --source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
connection master;
SET GLOBAL BINLOG_CHECKSUM=none;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=none;
connection master;
--echo **** On Master **** --echo **** On Master ****
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
...@@ -45,4 +51,9 @@ source include/check_slave_is_running.inc; ...@@ -45,4 +51,9 @@ source include/check_slave_is_running.inc;
connection master; connection master;
DROP TABLE t1; DROP TABLE t1;
--sync_slave_with_master --sync_slave_with_master
connection master;
SET GLOBAL BINLOG_CHECKSUM=default;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=default;
connection master;
--source include/rpl_end.inc --source include/rpl_end.inc
--source include/master-slave.inc --source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
connection master;
SET GLOBAL BINLOG_CHECKSUM=NONE;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=NONE;
connection master;
--echo **** On Master **** --echo **** On Master ****
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
...@@ -25,4 +31,12 @@ connection master; ...@@ -25,4 +31,12 @@ connection master;
--source include/show_binary_logs.inc --source include/show_binary_logs.inc
DROP TABLE t1; DROP TABLE t1;
--sync_slave_with_master --sync_slave_with_master
connection master;
SET GLOBAL BINLOG_CHECKSUM=default;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=default;
connection master;
--source include/rpl_end.inc --source include/rpl_end.inc
set @save_binlog_checksum= @@global.binlog_checksum; set @save_binlog_checksum= @@global.binlog_checksum;
set @@global.binlog_checksum = default; set @@global.binlog_checksum = default;
select @@global.binlog_checksum as 'must be NONE by default'; select @@global.binlog_checksum as 'must be CRC32 by default';
must be NONE by default must be CRC32 by default
NONE CRC32
select @@session.binlog_checksum as 'no session var'; select @@session.binlog_checksum as 'no session var';
ERROR HY000: Variable 'binlog_checksum' is a GLOBAL variable ERROR HY000: Variable 'binlog_checksum' is a GLOBAL variable
set @@global.binlog_checksum = CRC32; set @@global.binlog_checksum = CRC32;
......
...@@ -151,9 +151,9 @@ READ_ONLY NO ...@@ -151,9 +151,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_CHECKSUM VARIABLE_NAME BINLOG_CHECKSUM
SESSION_VALUE NULL SESSION_VALUE NULL
GLOBAL_VALUE NONE GLOBAL_VALUE CRC32
GLOBAL_VALUE_ORIGIN COMPILE-TIME GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NONE DEFAULT_VALUE CRC32
VARIABLE_SCOPE GLOBAL VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM VARIABLE_TYPE ENUM
VARIABLE_COMMENT Type of BINLOG_CHECKSUM_ALG. Include checksum for log events in the binary log VARIABLE_COMMENT Type of BINLOG_CHECKSUM_ALG. Include checksum for log events in the binary log
......
...@@ -151,9 +151,9 @@ READ_ONLY NO ...@@ -151,9 +151,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_CHECKSUM VARIABLE_NAME BINLOG_CHECKSUM
SESSION_VALUE NULL SESSION_VALUE NULL
GLOBAL_VALUE NONE GLOBAL_VALUE CRC32
GLOBAL_VALUE_ORIGIN COMPILE-TIME GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NONE DEFAULT_VALUE CRC32
VARIABLE_SCOPE GLOBAL VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM VARIABLE_TYPE ENUM
VARIABLE_COMMENT Type of BINLOG_CHECKSUM_ALG. Include checksum for log events in the binary log VARIABLE_COMMENT Type of BINLOG_CHECKSUM_ALG. Include checksum for log events in the binary log
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
set @save_binlog_checksum= @@global.binlog_checksum; set @save_binlog_checksum= @@global.binlog_checksum;
set @@global.binlog_checksum = default; set @@global.binlog_checksum = default;
select @@global.binlog_checksum as 'must be NONE by default'; select @@global.binlog_checksum as 'must be CRC32 by default';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR --error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.binlog_checksum as 'no session var'; select @@session.binlog_checksum as 'no session var';
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
--source include/have_log_bin.inc --source include/have_log_bin.inc
--source include/binlog_start_pos.inc --source include/binlog_start_pos.inc
--let $pos=`select $binlog_start_pos + 65` --let $pos=`select $binlog_start_pos + 73`
--let $binlog_file=query_get_value(SHOW MASTER STATUS, File, 1) --let $binlog_file=query_get_value(SHOW MASTER STATUS, File, 1)
--let $binlog_start=query_get_value(SHOW MASTER STATUS, Position, 1) --let $binlog_start=query_get_value(SHOW MASTER STATUS, Position, 1)
......
...@@ -27,7 +27,7 @@ DELETE FROM t2; ...@@ -27,7 +27,7 @@ DELETE FROM t2;
FLUSH BINARY LOGS; FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ --replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog --exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
DROP TABLE t1,t2; DROP TABLE t1,t2;
...@@ -1190,7 +1190,7 @@ source include/binlog_start_pos.inc; ...@@ -1190,7 +1190,7 @@ source include/binlog_start_pos.inc;
let _BINLOG_START_POS= $binlog_start_pos; let _BINLOG_START_POS= $binlog_start_pos;
--perl --perl
my $f= "$ENV{MYSQLTEST_VARDIR}/tmp/mwl136.sql"; my $f= "$ENV{MYSQLTEST_VARDIR}/tmp/mwl136.sql";
my $pos=$ENV{_BINLOG_START_POS} + 691; my $pos=$ENV{_BINLOG_START_POS} + 739;
open F, '<', $f or die "Failed to open $f: $!\n"; open F, '<', $f or die "Failed to open $f: $!\n";
while (<F>) { while (<F>) {
s/$pos/<pos>/; s/$pos/<pos>/;
......
...@@ -10093,7 +10093,7 @@ static MYSQL_SYSVAR_ENUM( ...@@ -10093,7 +10093,7 @@ static MYSQL_SYSVAR_ENUM(
"log events in the binary log", "log events in the binary log",
NULL, NULL,
binlog_checksum_update, binlog_checksum_update,
BINLOG_CHECKSUM_ALG_OFF, BINLOG_CHECKSUM_ALG_CRC32,
&binlog_checksum_typelib); &binlog_checksum_typelib);
static struct st_mysql_sys_var *binlog_sys_vars[]= static struct st_mysql_sys_var *binlog_sys_vars[]=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment