1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-19801: Change defaults for CHANGE MASTER TO so that GTID-based replication is used by default if master supports it

This commit makes replicas crash-safe by default by changing the
Using_Gtid value to be Slave_Pos on a fresh slave start and after
RESET SLAVE is issued. If the primary server does not support GTIDs
(i.e., version < 10), the replica will fall back to Using_Gtid=No on
slave start and after RESET SLAVE.

The following additional informational messages/warnings are added:

 1. When Using_Gtid is automatically changed. That is, if RESET
SLAVE reverts Using_Gtid back to Slave_Pos, or Using_Gtid is
inferred to No from a CHANGE MASTER TO given with log coordinates
without MASTER_USE_GTID.
 2. If options are ignored in CHANGE MASTER TO. If CHANGE MASTER TO
is given with log coordinates, yet also specifies
MASTER_USE_GTID=Slave_Pos, a warning message is given that the log
coordinate options are ignored.

Additionally, an MTR macro has been added for RESET SLAVE,
reset_slave.inc, which provides modes/options for resetting a slave
in log coordinate or gtid modes. When in log coordinates mode, the
macro will execute CHANGE MASTER TO MASTER_USE_GTID=No after the
RESET SLAVE command. When in GTID mode, an extra parameter,
reset_slave_keep_gtid_state, can be set to reset or preserve the
value of gtid_slave_pos.

Reviewed By:
===========
Andrei Elkin <andrei.elkin@mariadb.com>
This commit is contained in:
Brandon Nesterenko
2022-05-23 14:14:00 -06:00
parent 8c2faad576
commit 5ab5ff08b0
167 changed files with 1404 additions and 344 deletions

View File

@@ -159,7 +159,8 @@ set default_master_connection = '';
eval change master to
master_port=$SERVER_MYPORT_2,
master_host='127.0.0.1',
master_user='root';
master_user='root',
master_use_gtid=no;
start slave;
--source include/wait_for_slave_to_start.inc

View File

@@ -389,6 +389,11 @@ RESET MASTER;
--source include/rpl_reset.inc
-- connection slave
# Slave tests rely on logic of non-gtid mode
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
--source include/start_slave.inc
# slave suppressions
call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");

View File

@@ -21,6 +21,13 @@
# and slave are diverging.
#
########################################################################################
--connection slave
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
--source include/start_slave.inc
--connection master
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
let $old_max_binlog_cache_size= query_get_value(SHOW VARIABLES LIKE "max_binlog_cache_size", Value, 1);

View File

@@ -22,6 +22,10 @@
--source include/master-slave.inc
--connection slave
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
--source include/start_slave.inc
# Make sure the slave is stopped while we are messing with master.
# Otherwise we get occasional failures as the slave manages to re-connect
# to the newly started master and we get extra events applied, causing
@@ -49,7 +53,8 @@ show binlog events;
--connection slave
call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log");
reset slave;
--let $master_use_gtid_option= No
--source include/reset_slave.inc
start slave;
# ER_MASTER_FATAL_ERROR_READING_BINLOG 1236

View File

@@ -11,6 +11,12 @@
--source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--connection slave
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
--source include/start_slave.inc
--connection master
call mtr.add_suppression('Slave can not handle replication events with the checksum that master is configured to log');
call mtr.add_suppression('Replication event checksum verification failed');
# due to C failure simulation
@@ -196,7 +202,8 @@ select count(*) as 'must be zero' from t2;
#
connection slave;
stop slave;
reset slave;
--let $master_use_gtid_option= No
--source include/reset_slave.inc
# randomize slave server's own checksum policy
set @@global.binlog_checksum= IF(floor((rand()*1000)%2), "CRC32", "NONE");

View File

@@ -24,6 +24,12 @@
--source include/have_debug.inc
--source include/master-slave.inc
--connection slave
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
--source include/start_slave.inc
--connection master
# Block legal errors for MTR
call mtr.add_suppression('Found invalid event in binary log');
call mtr.add_suppression('Slave I/O: Relay log write failure: could not queue event from master');

View File

@@ -88,7 +88,7 @@ connection slave;
DELETE FROM t2;
# Set slave position to the BEGIN log event
--replace_result $master_pos_begin <master_pos_begin>
eval CHANGE MASTER TO MASTER_LOG_POS=$master_pos_begin;
eval CHANGE MASTER TO MASTER_LOG_POS=$master_pos_begin, MASTER_USE_GTID=NO;
BEGIN;
# Hold lock
SELECT * FROM t1 FOR UPDATE;
@@ -121,7 +121,7 @@ SET global max_relay_log_size=0;
DELETE FROM t2;
# Set slave position to the BEGIN log event
--replace_result $master_pos_begin <master_pos_begin>
eval CHANGE MASTER TO MASTER_LOG_POS=$master_pos_begin;
eval CHANGE MASTER TO MASTER_LOG_POS=$master_pos_begin, MASTER_USE_GTID=NO;
BEGIN;
# Hold lock
SELECT * FROM t1 FOR UPDATE;

View File

@@ -450,7 +450,7 @@ connection master;
--echo ** Stop and Reset Slave **
--echo
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
--echo
--echo ** create table slave side **
eval CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
@@ -507,7 +507,7 @@ sync_slave_with_master;
--echo
--echo *** Create t11 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
) ENGINE=$engine_type;
@@ -563,7 +563,7 @@ sync_slave_with_master;
--echo
--echo *** Create t12 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
) ENGINE=$engine_type;
@@ -614,7 +614,7 @@ sync_slave_with_master;
--echo
--echo *** Create t14 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=$engine_type;
@@ -689,7 +689,7 @@ connection slave;
#***************************
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
--echo
--echo *** Drop t14 ***
@@ -711,7 +711,7 @@ START SLAVE;
--echo
--echo *** Create t15 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=$engine_type;
@@ -753,7 +753,7 @@ connection slave;
--let $show_slave_sql_error= 1
--source include/wait_for_slave_sql_error.inc
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
--echo
--echo *** Drop t15 ***
@@ -775,7 +775,7 @@ START SLAVE;
--echo
--echo *** Create t16 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=$engine_type;
@@ -830,7 +830,7 @@ connection slave;
--let $show_slave_sql_error= 1
--source include/wait_for_slave_sql_error.inc
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
--echo
--echo *** Drop t16 ***
@@ -853,7 +853,7 @@ START SLAVE;
--echo
--echo *** Create t17 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=$engine_type;
@@ -919,7 +919,7 @@ sync_slave_with_master;
--echo
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=$engine_type;
@@ -982,7 +982,7 @@ sync_slave_with_master;
--echo
--echo *** Create t5 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=$engine_type;

View File

@@ -25,7 +25,7 @@ call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot
sync_slave_with_master;
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
@@ -71,7 +71,7 @@ sync_slave_with_master;
## BUG22086
--echo *** Create t2 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -96,7 +96,7 @@ START SLAVE;
--let $show_slave_sql_error= 1
--source include/wait_for_slave_sql_error.inc
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
SELECT * FROM t2 ORDER BY a;
connection master;
@@ -116,7 +116,7 @@ sync_slave_with_master;
####################################
--echo *** Create t3 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -161,7 +161,7 @@ sync_slave_with_master;
--echo *** Create t4 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -204,7 +204,7 @@ sync_slave_with_master;
--echo *** Create t5 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT, e DOUBLE,
f DECIMAL(8,2))ENGINE=$engine_type;
@@ -249,7 +249,7 @@ sync_slave_with_master;
--echo *** Create t6 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT)ENGINE=$engine_type;
@@ -307,7 +307,7 @@ DROP TABLE t6;
--echo *** Create t7 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e CHAR(20) DEFAULT 'Extra Column Testing')
@@ -349,7 +349,7 @@ sync_slave_with_master;
###########################################
--echo *** Create t8 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e INT)ENGINE=$engine_type;
@@ -395,7 +395,7 @@ sync_slave_with_master;
# Error reaction is up to sql_mode of the slave sql (bug#38173)
#--echo *** Create t9 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
@@ -449,7 +449,7 @@ sync_slave_with_master;
############################################
--echo *** Create t10 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
c CHAR(5), e INT DEFAULT '1')ENGINE=$engine_type;
@@ -491,7 +491,7 @@ sync_slave_with_master;
############################################
--echo *** Create t11 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t11 (a INT KEY, b BLOB, f INT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE=$engine_type;
@@ -533,7 +533,7 @@ sync_slave_with_master;
############################################
--echo *** Create t12 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE=$engine_type;
@@ -572,7 +572,7 @@ sync_slave_with_master;
--echo *** BUG 22177 Start ***
--echo *** Create t13 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5),
d INT DEFAULT '1',
e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -620,7 +620,7 @@ sync_slave_with_master;
--echo *** Create t14 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -660,7 +660,7 @@ SELECT * FROM t14 ORDER BY c1;
--echo *** Create t14a on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -690,7 +690,7 @@ sync_slave_with_master;
--replace_column 5 CURRENT_TIMESTAMP
SELECT * FROM t14a ORDER BY c1;
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
--echo *** Master Drop c5 ***
connection master;
@@ -749,7 +749,7 @@ sync_slave_with_master;
--echo *** Create t15 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
@@ -822,7 +822,7 @@ sync_slave_with_master;
--echo *** Create t16 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
@@ -877,7 +877,7 @@ sync_slave_with_master;
--echo *** Create t17 on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
eval CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')

View File

@@ -6,6 +6,12 @@
source include/master-slave.inc;
connection slave;
source include/stop_slave.inc;
change master to master_use_gtid=no;
source include/start_slave.inc;
connection master;
let $SERVER_VERSION=`select version()`;
create table t1 (a int) ENGINE=MyISAM;

View File

@@ -109,7 +109,7 @@ connection slave;
# RESET SLAVE and see if error is cleared in SHOW SLAVE STATUS.
stop slave;
reset slave;
--source include/reset_slave.inc
--source include/check_slave_no_error.inc
# Finally, see if logging is done ok on master for a failing LOAD DATA INFILE

View File

@@ -11,7 +11,9 @@
-- source include/master-slave.inc
sync_slave_with_master;
--disable_query_log
set sql_log_bin=0;
call mtr.add_suppression('Slave I/O: Get master BINLOG_CHECKSUM failed with error');
set sql_log_bin=1;
--enable_query_log
let $status_items= Master_User, Master_Host;
source include/show_slave_status.inc;
@@ -20,7 +22,7 @@ source include/stop_slave.inc;
change master to master_user='test';
source include/show_slave_status.inc;
reset slave;
--source include/reset_slave.inc
source include/show_slave_status.inc;
change master to master_user='root';
@@ -31,13 +33,13 @@ source include/show_slave_status.inc;
# test of crash with temp tables & RESET SLAVE
# (test to see if RESET SLAVE clears temp tables in memory and disk)
source include/stop_slave.inc;
reset slave;
--source include/reset_slave.inc
source include/start_slave.inc;
connection master;
create temporary table t1 (a int);
sync_slave_with_master;
source include/stop_slave.inc;
reset slave;
--source include/reset_slave.inc
source include/start_slave.inc;
sync_with_master;
show status like 'slave_open_temp_tables';
@@ -51,7 +53,7 @@ sync_slave_with_master;
# clearing the status
source include/stop_slave.inc;
reset slave;
--source include/reset_slave.inc
source include/check_slave_no_error.inc;
#
@@ -79,7 +81,7 @@ let $slave_io_errno= 1045;
--source include/wait_for_slave_io_error.inc
--source include/stop_slave_sql.inc
reset slave;
--source include/reset_slave.inc
source include/check_slave_no_error.inc;
change master to master_user='root';
@@ -88,7 +90,7 @@ change master to master_user='root';
# BUG#11809016 - NO WAY TO DISCOVER AN INSTANCE IS NO LONGER A SLAVE FOLLOWING MYSQL BUG#28796
#
reset slave;
--source include/reset_slave.inc
--source include/start_slave.inc
--source include/stop_slave.inc
@@ -97,6 +99,7 @@ reset slave;
--let $_slave_master_port= query_get_value(SHOW SLAVE STATUS, Master_Port, 1)
reset slave all;
set @@global.gtid_slave_pos= "";
--error ER_BAD_SLAVE
start slave;

View File

@@ -17,9 +17,16 @@ call mtr.add_suppression("Read semi-sync reply");
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
call mtr.add_suppression("mysqld: Got an error reading communication packets");
connection slave;
# While 'Current_Pos' exists as an option for Using_Gtd, keeping these
# events in the binlog will update gtid_binlog_pos, and the later calls to
# set `@@global.gtid_slave_pos= ""` will provide warning messages with
# inconsistent GTID values because the seq_nos are non-deterministic with
# the masters events coming in concurrently
set sql_log_bin=0;
call mtr.add_suppression("Master server does not support semi-sync");
call mtr.add_suppression("Semi-sync slave .* reply");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
set sql_log_bin=1;
connection master;
# wait for dying connections (if any) to disappear
@@ -36,7 +43,7 @@ let $_connections_normal_slave= query_get_value(SHOW STATUS LIKE 'Threads_connec
--echo #
connection slave;
source include/stop_slave.inc;
reset slave;
--source include/reset_slave.inc
set global rpl_semi_sync_master_enabled= 0;
set global rpl_semi_sync_slave_enabled= 0;
@@ -351,7 +358,7 @@ show status like 'Rpl_semi_sync_master_yes_tx';
connection slave;
source include/stop_slave.inc;
reset slave;
--source include/reset_slave.inc
# Kill the dump thread on master for previous slave connection and
--source include/kill_binlog_dump_threads.inc
@@ -388,7 +395,7 @@ show status like 'Rpl_semi_sync_master_yes_tx';
--echo #
connection slave;
source include/stop_slave.inc;
reset slave;
--source include/reset_slave.inc
connection master;
reset master;

View File

@@ -19,6 +19,12 @@
--source include/have_innodb.inc
--source include/master-slave.inc
--connection slave
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
--source include/start_slave.inc
--connection master
connection slave;
# Test that SUPER is required to change @@replicate_events_marked_for_skip.
CREATE USER 'nonsuperuser'@'127.0.0.1';

View File

@@ -195,7 +195,7 @@ let $master_pos= `SELECT $master_pos + 1`;
--connection slave
--source include/stop_slave.inc
--replace_regex /[0-9]+/MASTER_POS/
eval CHANGE MASTER TO master_log_pos=$master_pos;
eval CHANGE MASTER TO master_log_pos=$master_pos, master_use_gtid=no;
START SLAVE;
# ER_MASTER_FATAL_ERROR_READING_BINLOG 1236

View File

@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
create table t1 (n int not null auto_increment primary key);
insert into t1 values(NULL);
insert into t1 values(2);

View File

@@ -38,6 +38,8 @@ id
==== Clean up ====
stop slave sql_thread;
include/cleanup_fake_relay_log.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
DROP TABLE t1, t2;
DROP PROCEDURE p1;
DROP PROCEDURE p2;

View File

@@ -14,4 +14,6 @@ include/wait_for_slave_sql_error.inc [errno=1594]
Last_SQL_Error = Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MariaDB code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
==== Clean up ====
include/cleanup_fake_relay_log.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
include/rpl_end.inc

View File

@@ -232,6 +232,9 @@ connection master;
#######################################################################
include/rpl_reset.inc
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");
call mtr.add_suppression("Error writing file .*");
call mtr.add_suppression("Could not use .*");
@@ -277,5 +280,7 @@ include/stop_slave_sql.inc
Warnings:
Note 1255 Slave already has been stopped
RESET SLAVE;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
RESET MASTER;
include/rpl_end.inc

View File

@@ -2,6 +2,9 @@ include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
include/stop_slave.inc
connection master;
call mtr.add_suppression("Error in Log_event::read_log_event()");
include/rpl_stop_server.inc [server_number=1]
@@ -10,7 +13,9 @@ show binlog events;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
connection slave;
call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log");
reset slave;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
start slave;
include/wait_for_slave_param.inc [Last_IO_Errno]
Last_IO_Errno = '1236'
@@ -20,6 +25,8 @@ reset master;
connection slave;
stop slave;
reset slave;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
drop table if exists t;
reset master;
End of the tests

View File

@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
call mtr.add_suppression('Slave can not handle replication events with the checksum that master is configured to log');
call mtr.add_suppression('Replication event checksum verification failed');
call mtr.add_suppression('Relay log write failure: could not queue event from master');
@@ -122,7 +127,9 @@ must be zero
0
connection slave;
stop slave;
reset slave;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
set @@global.binlog_checksum= IF(floor((rand()*1000)%2), "CRC32", "NONE");
flush logs;
connection master;

View File

@@ -184,6 +184,8 @@ connection server_3;
RESET MASTER;
connection server_4;
RESET SLAVE;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
include/rpl_change_topology.inc [new topology=1->2->3->4->1]
include/start_slave.inc
connection server_3;

View File

@@ -6,7 +6,7 @@ DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
include/wait_for_slave_to_stop.inc
RESET SLAVE;
include/reset_slave.inc
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE TABLE t1 (

View File

@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
call mtr.add_suppression('Found invalid event in binary log');
call mtr.add_suppression('Slave I/O: Relay log write failure: could not queue event from master');
call mtr.add_suppression('event read from binlog did not pass crc check');

View File

@@ -16,5 +16,7 @@ zero
==== Clean up ====
include/stop_slave_sql.inc
include/cleanup_fake_relay_log.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
drop table t1, t3;
include/rpl_end.inc

View File

@@ -63,7 +63,7 @@ include/check_slave_is_running.inc
connection slave;
include/stop_slave.inc
DELETE FROM t2;
CHANGE MASTER TO MASTER_LOG_POS=<master_pos_begin>;
CHANGE MASTER TO MASTER_LOG_POS=<master_pos_begin>, MASTER_USE_GTID=NO;
BEGIN;
SELECT * FROM t1 FOR UPDATE;
a
@@ -95,7 +95,7 @@ Warnings:
Warning 1292 Truncated incorrect max_relay_log_size value: '0'
include/stop_slave.inc
DELETE FROM t2;
CHANGE MASTER TO MASTER_LOG_POS=<master_pos_begin>;
CHANGE MASTER TO MASTER_LOG_POS=<master_pos_begin>, MASTER_USE_GTID=NO;
BEGIN;
SELECT * FROM t1 FOR UPDATE;
a

View File

@@ -3,6 +3,9 @@ include/master-slave.inc
call mtr.add_suppression("Unsafe statement written to the binary log using statement format");
connection slave;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format");
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
[on master]
CREATE TABLE t1 (a VARCHAR(100), b INT);
@@ -153,7 +156,9 @@ CHANGE MASTER TO MASTER_DELAY = 71;
include/start_slave.inc
# Asserted this: Delay should be 71 when we set it to 71
include/stop_slave.inc
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is changing the current value of Using_Gtid from 'No' to its default value of 'Slave_Pos'
[on master]
connection master;
RESET MASTER;

View File

@@ -437,7 +437,7 @@ connection master;
** Stop and Reset Slave **
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
** create table slave side **
CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
@@ -482,7 +482,7 @@ connection slave;
*** Create t11 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
) ENGINE='InnoDB';
@@ -524,7 +524,7 @@ connection slave;
*** Create t12 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
) ENGINE='InnoDB';
@@ -573,7 +573,7 @@ connection slave;
*** Create t14 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -638,7 +638,7 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1091]
Last_SQL_Error = 'Error 'Can't DROP COLUMN `c7`; check that it exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7''
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
*** Drop t14 ***
DROP TABLE t14;
@@ -655,7 +655,9 @@ START SLAVE;
*** Create t15 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-103. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -693,7 +695,9 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1054]
Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7''
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-104. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
*** Drop t15 ***
DROP TABLE t15;
@@ -710,7 +714,9 @@ START SLAVE;
*** Create t16 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-105. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -748,7 +754,9 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1072]
Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)''
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-106. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
*** Drop t16 ***
DROP TABLE t16;
@@ -765,7 +773,9 @@ START SLAVE;
*** Create t17 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-107. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -831,7 +841,7 @@ connection slave;
*** Create t18 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -896,7 +906,7 @@ connection slave;
*** Create t5 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';

View File

@@ -437,7 +437,7 @@ connection master;
** Stop and Reset Slave **
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
** create table slave side **
CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
@@ -482,7 +482,7 @@ connection slave;
*** Create t11 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
) ENGINE='MyISAM';
@@ -524,7 +524,7 @@ connection slave;
*** Create t12 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
) ENGINE='MyISAM';
@@ -573,7 +573,7 @@ connection slave;
*** Create t14 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -638,7 +638,7 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1091]
Last_SQL_Error = 'Error 'Can't DROP COLUMN `c7`; check that it exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7''
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
*** Drop t14 ***
DROP TABLE t14;
@@ -655,7 +655,9 @@ START SLAVE;
*** Create t15 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-103. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -693,7 +695,9 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1054]
Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7''
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-104. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
*** Drop t15 ***
DROP TABLE t15;
@@ -710,7 +714,9 @@ START SLAVE;
*** Create t16 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-105. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -748,7 +754,9 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1072]
Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)''
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-106. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
*** Drop t16 ***
DROP TABLE t16;
@@ -765,7 +773,9 @@ START SLAVE;
*** Create t17 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-107. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -831,7 +841,7 @@ connection slave;
*** Create t18 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -896,7 +906,7 @@ connection slave;
*** Create t5 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';

View File

@@ -5,7 +5,7 @@ call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot
**** Diff Table Def Start ****
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
@@ -42,7 +42,7 @@ DROP TABLE t1;
connection slave;
*** Create t2 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -66,7 +66,9 @@ START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1677]
Last_SQL_Error = 'Column 2 of table 'test.t2' cannot be converted from type 'char(10 octets)' to type 'char(5 octets) character set latin1''
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-4. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
SELECT * FROM t2 ORDER BY a;
a b c d e
connection master;
@@ -79,7 +81,7 @@ DROP TABLE t2;
connection slave;
*** Create t3 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -109,7 +111,7 @@ DROP TABLE t3;
connection slave;
*** Create t4 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -138,7 +140,7 @@ DROP TABLE t4;
connection slave;
*** Create t5 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT, e DOUBLE,
f DECIMAL(8,2))ENGINE='InnoDB';
@@ -167,7 +169,7 @@ DROP TABLE t5;
connection slave;
*** Create t6 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT)ENGINE='InnoDB';
*** Create t6 on Master ***
@@ -198,7 +200,7 @@ connection slave;
**** Extra Colums Start ****
*** Create t7 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e CHAR(20) DEFAULT 'Extra Column Testing')
@@ -234,7 +236,7 @@ DROP TABLE t7;
connection slave;
*** Create t8 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e INT)ENGINE='InnoDB';
@@ -256,7 +258,7 @@ connection master;
DROP TABLE t8;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
@@ -289,7 +291,7 @@ DROP TABLE t9;
connection slave;
*** Create t10 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB';
*** Create t10 on Master ***
@@ -317,7 +319,7 @@ DROP TABLE t10;
connection slave;
*** Create t11 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t11 (a INT KEY, b BLOB, f INT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB';
*** Create t11 on Master ***
@@ -345,7 +347,7 @@ DROP TABLE t11;
connection slave;
*** Create t12 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB';
*** Create t12 on Master ***
@@ -381,7 +383,7 @@ connection slave;
*** BUG 22177 Start ***
*** Create t13 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5),
d INT DEFAULT '1',
e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -419,7 +421,7 @@ connection slave;
*** Alter Master Table Testing Start ***
*** Create t14 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -455,7 +457,7 @@ c1 c2 c3 c4 c5 c6 c7
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
*** Create t14a on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -488,7 +490,7 @@ c1 c4 c5 c6 c7
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
*** Master Drop c5 ***
connection master;
ALTER TABLE t14a DROP COLUMN c5;
@@ -547,7 +549,7 @@ DROP TABLE t14;
connection slave;
*** Create t15 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
@@ -615,7 +617,7 @@ DROP TABLE t15;
connection slave;
*** Create t16 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
@@ -687,7 +689,7 @@ connection slave;
*** Alter Master End ***
*** Create t17 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')

View File

@@ -5,7 +5,7 @@ call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot
**** Diff Table Def Start ****
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
@@ -42,7 +42,7 @@ DROP TABLE t1;
connection slave;
*** Create t2 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -66,7 +66,9 @@ START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1677]
Last_SQL_Error = 'Column 2 of table 'test.t2' cannot be converted from type 'char(10 octets)' to type 'char(5 octets) character set latin1''
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-4. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
SELECT * FROM t2 ORDER BY a;
a b c d e
connection master;
@@ -79,7 +81,7 @@ DROP TABLE t2;
connection slave;
*** Create t3 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -109,7 +111,7 @@ DROP TABLE t3;
connection slave;
*** Create t4 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -138,7 +140,7 @@ DROP TABLE t4;
connection slave;
*** Create t5 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT, e DOUBLE,
f DECIMAL(8,2))ENGINE='MyISAM';
@@ -167,7 +169,7 @@ DROP TABLE t5;
connection slave;
*** Create t6 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT)ENGINE='MyISAM';
*** Create t6 on Master ***
@@ -198,7 +200,7 @@ connection slave;
**** Extra Colums Start ****
*** Create t7 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e CHAR(20) DEFAULT 'Extra Column Testing')
@@ -234,7 +236,7 @@ DROP TABLE t7;
connection slave;
*** Create t8 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e INT)ENGINE='MyISAM';
@@ -256,7 +258,7 @@ connection master;
DROP TABLE t8;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
@@ -289,7 +291,7 @@ DROP TABLE t9;
connection slave;
*** Create t10 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM';
*** Create t10 on Master ***
@@ -317,7 +319,7 @@ DROP TABLE t10;
connection slave;
*** Create t11 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t11 (a INT KEY, b BLOB, f INT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM';
*** Create t11 on Master ***
@@ -345,7 +347,7 @@ DROP TABLE t11;
connection slave;
*** Create t12 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM';
*** Create t12 on Master ***
@@ -381,7 +383,7 @@ connection slave;
*** BUG 22177 Start ***
*** Create t13 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5),
d INT DEFAULT '1',
e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -419,7 +421,7 @@ connection slave;
*** Alter Master Table Testing Start ***
*** Create t14 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -455,7 +457,7 @@ c1 c2 c3 c4 c5 c6 c7
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
*** Create t14a on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -488,7 +490,7 @@ c1 c4 c5 c6 c7
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
*** Master Drop c5 ***
connection master;
ALTER TABLE t14a DROP COLUMN c5;
@@ -547,7 +549,7 @@ DROP TABLE t14;
connection slave;
*** Create t15 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
@@ -615,7 +617,7 @@ DROP TABLE t15;
connection slave;
*** Create t16 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
@@ -687,7 +689,7 @@ connection slave;
*** Alter Master End ***
*** Create t17 on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')

View File

@@ -377,6 +377,8 @@ a b
connection server_1;
include/stop_slave.inc
RESET SLAVE ALL;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
connection server_2;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_1;
include/start_slave.inc

View File

@@ -53,6 +53,8 @@ connection server_1;
include/stop_slave.inc
include/wait_for_slave_to_stop.inc
reset slave all;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
connection server_2;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_1,
master_user = 'root', MASTER_USE_GTID=CURRENT_POS;

View File

@@ -67,6 +67,8 @@ a
11
include/stop_slave.inc
RESET SLAVE ALL;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
INSERT INTO t1 VALUES (12);
connection server_2;
INSERT INTO t1 VALUES (22);

View File

@@ -58,8 +58,8 @@ connection server_3;
include/sync_with_master_gtid.inc
connection server_2;
STOP SLAVE;
CHANGE MASTER TO MASTER_USE_GTID = NO, IGNORE_DOMAIN_IDS = ();
CHANGE MASTER TO IGNORE_DOMAIN_IDS = ();
connection server_3;
STOP SLAVE;
CHANGE MASTER TO MASTER_USE_GTID = NO, IGNORE_DOMAIN_IDS = ();
CHANGE MASTER TO IGNORE_DOMAIN_IDS = ();
# End of test.

View File

@@ -46,6 +46,8 @@ a b
4 2
include/stop_slave.inc
RESET SLAVE;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
INSERT INTO t1 VALUES (5, 1);
INSERT INTO t1 VALUES (6, 1);
include/save_master_gtid.inc

View File

@@ -38,7 +38,7 @@ START SLAVE;
include/wait_for_slave_io_error.inc [errno=1236]
include/stop_slave.inc
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
MASTER_LOG_FILE="master-bin.000003", MASTER_LOG_POS=4;
MASTER_LOG_FILE="master-bin.000003", MASTER_LOG_POS=4, MASTER_USE_GTID=NO;
include/start_slave.inc
SELECT * FROM t1 ORDER BY a;
a
@@ -90,6 +90,8 @@ connection server_2;
connection server_2;
include/stop_slave.inc
RESET SLAVE ALL;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
RESET MASTER;
connection server_1;
RESET MASTER;
@@ -119,6 +121,8 @@ connection server_2;
include/stop_slave.inc
DROP TABLE t1;
RESET SLAVE;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
SET GLOBAL gtid_slave_pos="";
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-4. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
@@ -145,7 +149,7 @@ a
2
*** Test that RESET SLAVE clears the Using_Gtid flag. ***
include/stop_slave.inc
RESET SLAVE;
include/reset_slave.inc
Using_Gtid = 'No'
START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1050]
@@ -238,6 +242,9 @@ connection server_2;
include/stop_slave.inc
DROP TABLE t1;
RESET SLAVE ALL;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
CHANGE MASTER TO MASTER_USE_GTID=NO;
RESET MASTER;
SET GLOBAL gtid_slave_pos= "";
CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=no, master_log_file="", master_log_pos= 4;

View File

@@ -6,7 +6,7 @@ INSERT INTO t1 VALUES (1);
connection server_2;
include/stop_slave.inc
Master_Log_File = 'master-bin.000001'
Using_Gtid = 'No'
Using_Gtid = 'Slave_Pos'
CHANGE MASTER TO master_use_gtid=current_pos;
FLUSH LOGS;
connection server_1;

View File

@@ -1,4 +1,8 @@
include/rpl_init.inc [topology=1->2]
connection server_2;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection server_1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
CREATE FUNCTION extract_gtid(d VARCHAR(100), s VARCHAR(100))
@@ -199,6 +203,8 @@ include/start_slave.inc
connection server_2;
include/stop_slave.inc
RESET SLAVE ALL;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
RESET MASTER;
SET GLOBAL gtid_slave_pos='';
connection server_1;

View File

@@ -14,12 +14,12 @@ connection slave;
*** Default value ***
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root';
slave_net_timeout/slave_heartbeat_timeout=2.0000
RESET SLAVE;
include/reset_slave.inc
*** Reset slave affect ***
SET @@global.slave_net_timeout=30;
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=5;
RESET SLAVE;
include/reset_slave.inc
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
Variable_name Value
Slave_heartbeat_period 15.000
@@ -31,7 +31,7 @@ SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
Variable_name Value
Slave_heartbeat_period 25.000
SET @@global.slave_net_timeout=@restore_slave_net_timeout;
RESET SLAVE;
include/reset_slave.inc
*** Warning if updated slave_net_timeout < slave_heartbeat_timeout ***
SET @@global.slave_net_timeout=FLOOR(SLAVE_HEARTBEAT_TIMEOUT)-1;
@@ -223,11 +223,15 @@ INSERT INTO t1 VALUES (1, 'on slave', NULL);
connection master;
INSERT INTO t1 VALUES (1, 'on master', NULL);
connection slave;
set sql_log_bin= 0;
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* error.* 1062");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
set sql_log_bin= 1;
Heartbeat events are received while sql thread stopped (1 means 'yes'): 1
include/stop_slave.inc
set sql_log_bin= 0;
DROP TABLE t1;
set sql_log_bin= 1;
*** Master send to slave ***
connection master;
@@ -240,7 +244,9 @@ END|
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
connection slave;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-2. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=5;
include/start_slave.inc
connection master;
@@ -256,8 +262,10 @@ connection slave;
*** Flush logs on slave ***
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
set sql_log_bin= 0;
DROP TABLE t1;
set sql_log_bin= 1;
connection master;
DROP TABLE t1;
RESET MASTER;
@@ -271,7 +279,7 @@ connection master;
SET @@global.slave_compressed_protocol=1;
connection slave;
include/stop_slave.inc
RESET SLAVE;
include/reset_slave.inc
SET @@global.slave_compressed_protocol=1;
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.1;
include/start_slave.inc
@@ -283,7 +291,7 @@ SET @@global.slave_compressed_protocol=0;
*** Reset master ***
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.1;
include/start_slave.inc
connection master;
@@ -294,7 +302,7 @@ Heartbeat events are received after reset of master (1 means 'yes'): 1
*** Reload master ***
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.1;
include/start_slave.inc
Heartbeat event received

View File

@@ -15,7 +15,8 @@ MASTER_LOG_FILE='MASTER_BINLOG',
MASTER_SSL=1,
MASTER_SSL_CA='MYSQL_TEST_DIR/std_data/cacert.pem',
MASTER_SSL_CERT='MYSQL_TEST_DIR/std_data/client-cert.pem',
MASTER_SSL_KEY='MYSQL_TEST_DIR/std_data/client-key.pem';
MASTER_SSL_KEY='MYSQL_TEST_DIR/std_data/client-key.pem',
MASTER_USE_GTID=NO;
include/start_slave.inc
Master_SSL_Allowed: Yes
Heartbeat event has received

View File

@@ -57,7 +57,9 @@ load data infile '../../std_data/rpl_loaddata.dat' into table t1;
connection slave;
include/wait_for_slave_sql_error.inc [errno=1062]
stop slave;
reset slave;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-14. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
include/check_slave_no_error.inc
connection master;
reset master;

View File

@@ -9,7 +9,7 @@ File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
include/stop_slave.inc
change master to master_log_pos=MASTER_LOG_POS;
change master to master_log_pos=MASTER_LOG_POS, master_use_gtid=no;
start slave;
include/wait_for_slave_io_error.inc [errno=1236]
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
@@ -23,7 +23,7 @@ drop table if exists t1;
create table t1 (n int);
insert into t1 values (1),(2),(3);
connection slave;
change master to master_log_pos=MASTER_LOG_POS;
change master to master_log_pos=MASTER_LOG_POS, master_use_gtid=no;
start slave;
select * from t1 ORDER BY n;
n

View File

@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
FLUSH LOGS;
CREATE TABLE t1(c1 INT);
connection slave;

View File

@@ -4,6 +4,9 @@ connection master;
set @old_master_binlog_checksum= @@global.binlog_checksum;
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
include/stop_slave.inc
# Test slave with no capability gets dummy event, which is ignored.
set @old_dbug= @@global.debug_dbug;
SET @@global.debug_dbug='+d,simulate_slave_capability_none';

View File

@@ -13,7 +13,7 @@ SET @old_engine= @@GLOBAL.default_storage_engine;
SET GLOBAL default_storage_engine=InnoDB;
SET @old_parallel= @@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=12;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;
include/start_slave.inc
connection master;
SET SQL_LOG_BIN=0;

View File

@@ -31,7 +31,7 @@ a b c
2 2 3
stop slave;
include/wait_for_slave_to_stop.inc
reset slave;
include/reset_slave.inc
connection master;
reset master;
drop table t1;
@@ -191,7 +191,7 @@ a b c
2 2 3
stop slave;
include/wait_for_slave_to_stop.inc
reset slave;
include/reset_slave.inc
connection master;
reset master;
drop table t1;

View File

@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
SET GLOBAL max_binlog_cache_size = 4096;
SET GLOBAL binlog_cache_size = 4096;

View File

@@ -10,7 +10,7 @@ connection master;
include/rpl_stop_server.inc [server_number=1]
include/rpl_start_server.inc [server_number=1]
connection slave;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;
include/start_slave.inc
connection master;
connection slave;

View File

@@ -10,7 +10,7 @@ connection master;
include/rpl_stop_server.inc [server_number=1]
include/rpl_start_server.inc [server_number=1]
connection slave;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;
include/start_slave.inc
connection master;
connection slave;

View File

@@ -8,7 +8,7 @@ include/rpl_start_server.inc [server_number=1]
connection slave;
SET @old_parallel= @@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;
FLUSH TABLES WITH READ LOCK;
include/start_slave.inc
include/wait_for_slave_param.inc [Seconds_Behind_Master]

View File

@@ -55,6 +55,7 @@ connection slave;
include/stop_slave.inc
reset slave;
reset master;
set @@global.gtid_slave_pos= "";
set @saved_slave_trans_retry_interval= @@GLOBAL.slave_transaction_retry_interval;
set global slave_transaction_retry_interval=1;
include/start_slave.inc

View File

@@ -6,7 +6,7 @@ DROP TABLE t1;
connection slave;
==== Check that we can understand the new format of relay-log.info ====
include/stop_slave.inc
RESET SLAVE;
include/reset_slave.inc
# Read relay-log.info
START SLAVE IO_THREAD;
include/wait_for_slave_io_to_start.inc

View File

@@ -6,7 +6,7 @@ DROP TABLE t1;
connection slave;
==== Check that we still understand the old format of relay-log.info ====
include/stop_slave.inc
RESET SLAVE;
include/reset_slave.inc
# Read relay-log.info
START SLAVE IO_THREAD;
include/wait_for_slave_io_to_start.inc

View File

@@ -22,7 +22,7 @@ START SLAVE;
ERROR HY000: Could not initialize master info structure for ''; more error messages can be found in the MariaDB error log
START SLAVE;
ERROR HY000: Could not initialize master info structure for ''; more error messages can be found in the MariaDB error log
RESET SLAVE;
include/reset_slave.inc
DROP TABLE t1;
START SLAVE UNTIL MASTER_LOG_FILE= 'MASTER_LOG_FILE', MASTER_LOG_POS= MASTER_LOG_POS;;
include/wait_for_slave_sql_to_stop.inc

View File

@@ -6,7 +6,7 @@ connection master;
RESET MASTER;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
connection master;
SELECT COUNT(*) FROM t1;
COUNT(*)

View File

@@ -11,7 +11,7 @@ Warnings:
Note 1051 Unknown table 'test.t1'
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
CREATE TABLE t1 (a DECIMAL(5,2));
connection master;
CREATE TABLE t1 (a DECIMAL(20, 10));
@@ -25,7 +25,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -34,7 +36,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a DECIMAL(27, 9));
connection master;
CREATE TABLE t1 (a DECIMAL(27, 18));
@@ -48,7 +52,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -57,7 +63,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a NUMERIC(5,2));
connection master;
CREATE TABLE t1 (a NUMERIC(20, 10));
@@ -71,7 +79,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -81,7 +91,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a FLOAT(20));
connection master;
CREATE TABLE t1 (a FLOAT(47));
@@ -95,7 +107,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -105,7 +119,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a BIT(5));
connection master;
CREATE TABLE t1 (a BIT(64));
@@ -119,7 +135,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -128,7 +146,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a BIT(11));
connection master;
CREATE TABLE t1 (a BIT(12));
@@ -142,7 +162,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -152,7 +174,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a SET('4'));
connection master;
CREATE TABLE t1 (a SET('1','2','3','4','5','6','7','8','9'));
@@ -166,7 +190,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -176,7 +202,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a CHAR(10));
connection master;
CREATE TABLE t1 (a CHAR(20));
@@ -190,7 +218,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -200,7 +230,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a ENUM('44','54'));
connection master;
CREATE TABLE t1 (a ENUM(
@@ -245,7 +277,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -255,7 +289,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a VARCHAR(100));
connection master;
CREATE TABLE t1 (a VARCHAR(2000));
@@ -269,7 +305,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -278,7 +316,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a VARCHAR(10));
connection master;
CREATE TABLE t1 (a VARCHAR(200));
@@ -292,7 +332,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -301,7 +343,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a VARCHAR(1000));
connection master;
CREATE TABLE t1 (a VARCHAR(2000));
@@ -315,7 +359,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;
@@ -325,7 +371,9 @@ connection master;
DROP TABLE IF EXISTS t1;
connection slave;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
CREATE TABLE t1 (a TINYBLOB);
connection master;
CREATE TABLE t1 (a LONGBLOB);
@@ -339,7 +387,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;

View File

@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
change master to master_use_gtid=no;
include/start_slave.inc
connection master;
create table t1 (a int) ENGINE=MyISAM;
insert into t1 values (10);
create table t2 (a int) ENGINE=MyISAM;

View File

@@ -75,7 +75,9 @@ load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
connection slave;
include/wait_for_slave_sql_error.inc [errno=1062]
stop slave;
reset slave;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-11. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
include/check_slave_no_error.inc
connection master;
reset master;

View File

@@ -91,7 +91,7 @@ include/wait_for_slave_to_stop.inc
connection master;
reset master;
connection slave;
reset slave;
include/reset_slave.inc
start slave;
include/wait_for_slave_to_start.inc
connection master;
@@ -221,7 +221,7 @@ include/wait_for_slave_to_stop.inc
connection master;
reset master;
connection slave;
reset slave;
include/reset_slave.inc
start slave;
include/wait_for_slave_to_start.inc
connection master;
@@ -356,7 +356,7 @@ include/wait_for_slave_to_stop.inc
connection master;
reset master;
connection slave;
reset slave;
include/reset_slave.inc
start slave;
include/wait_for_slave_to_start.inc
connection master;

View File

@@ -7,7 +7,7 @@ include/stop_slave.inc
change master to master_user='test';
Master_User = 'test'
Master_Host = '127.0.0.1'
reset slave;
include/reset_slave.inc
Master_User = 'test'
Master_Host = '127.0.0.1'
change master to master_user='root';
@@ -15,13 +15,13 @@ include/start_slave.inc
Master_User = 'root'
Master_Host = '127.0.0.1'
include/stop_slave.inc
reset slave;
include/reset_slave.inc
include/start_slave.inc
connection master;
create temporary table t1 (a int);
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
include/start_slave.inc
show status like 'slave_open_temp_tables';
Variable_name Value
@@ -30,7 +30,7 @@ connection master;
drop temporary table if exists t1;
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
include/check_slave_no_error.inc
change master to master_user='impossible_user_name';
start slave;
@@ -44,13 +44,14 @@ change master to master_user='impossible_user_name';
start slave;
include/wait_for_slave_io_error.inc [errno=1045]
include/stop_slave_sql.inc
reset slave;
include/reset_slave.inc
include/check_slave_no_error.inc
change master to master_user='root';
reset slave;
include/reset_slave.inc
include/start_slave.inc
include/stop_slave.inc
reset slave all;
set @@global.gtid_slave_pos= "";
start slave;
ERROR HY000: Misconfigured slave: MASTER_HOST was not set; Fix in config file or with CHANGE MASTER TO
CHANGE MASTER TO MASTER_HOST= 'MASTER_HOST', MASTER_USER= 'MASTER_USER', MASTER_PORT= MASTER_PORT;

View File

@@ -10,7 +10,7 @@ INSERT INTO t2 VALUES (3),(4);
DROP TABLE t2;
connection slave;
include/stop_slave.inc
RESET SLAVE;
include/reset_slave.inc
CHANGE MASTER TO MASTER_USER='root', MASTER_CONNECT_RETRY=1, MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT;
connection slave;
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_drop_t1;
@@ -52,7 +52,7 @@ START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', MASTER_LOG_POS=MASTER
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS;
include/stop_slave.inc
RESET SLAVE;
include/reset_slave.inc
include/start_slave.inc
include/rpl_reset.inc
connection master;

View File

@@ -2,6 +2,9 @@ include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
include/stop_slave.inc
SET @save_dbug= @@GLOBAL.debug_dbug;
SET @@global.debug_dbug="+d,pause_sql_thread_on_fde";
include/start_slave.inc

View File

@@ -6,16 +6,18 @@ call mtr.add_suppression("Read semi-sync reply");
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
call mtr.add_suppression("mysqld: Got an error reading communication packets");
connection slave;
set sql_log_bin=0;
call mtr.add_suppression("Master server does not support semi-sync");
call mtr.add_suppression("Semi-sync slave .* reply");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
set sql_log_bin=1;
connection master;
#
# Uninstall semi-sync plugins on master and slave
#
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
set global rpl_semi_sync_master_enabled= 0;
set global rpl_semi_sync_slave_enabled= 0;
connection master;
@@ -310,7 +312,7 @@ Variable_name Value
Rpl_semi_sync_master_yes_tx 0
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
include/kill_binlog_dump_threads.inc
connection slave;
include/start_slave.inc
@@ -340,7 +342,7 @@ Rpl_semi_sync_master_yes_tx 3
#
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
connection master;
reset master;
include/kill_binlog_dump_threads.inc

View File

@@ -7,16 +7,18 @@ call mtr.add_suppression("Read semi-sync reply");
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
call mtr.add_suppression("mysqld: Got an error reading communication packets");
connection slave;
set sql_log_bin=0;
call mtr.add_suppression("Master server does not support semi-sync");
call mtr.add_suppression("Semi-sync slave .* reply");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
set sql_log_bin=1;
connection master;
#
# Uninstall semi-sync plugins on master and slave
#
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
set global rpl_semi_sync_master_enabled= 0;
set global rpl_semi_sync_slave_enabled= 0;
connection master;
@@ -311,7 +313,7 @@ Variable_name Value
Rpl_semi_sync_master_yes_tx 0
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
include/kill_binlog_dump_threads.inc
connection slave;
include/start_slave.inc
@@ -341,7 +343,7 @@ Rpl_semi_sync_master_yes_tx 3
#
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
connection master;
reset master;
include/kill_binlog_dump_threads.inc

View File

@@ -7,16 +7,18 @@ call mtr.add_suppression("Read semi-sync reply");
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
call mtr.add_suppression("mysqld: Got an error reading communication packets");
connection slave;
set sql_log_bin=0;
call mtr.add_suppression("Master server does not support semi-sync");
call mtr.add_suppression("Semi-sync slave .* reply");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
set sql_log_bin=1;
connection master;
#
# Uninstall semi-sync plugins on master and slave
#
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
set global rpl_semi_sync_master_enabled= 0;
set global rpl_semi_sync_slave_enabled= 0;
connection master;
@@ -311,7 +313,7 @@ Variable_name Value
Rpl_semi_sync_master_yes_tx 0
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
include/kill_binlog_dump_threads.inc
connection slave;
include/start_slave.inc
@@ -341,7 +343,7 @@ Rpl_semi_sync_master_yes_tx 3
#
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
connection master;
reset master;
include/kill_binlog_dump_threads.inc

View File

@@ -1,6 +1,9 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
create table t1 (n int);
reset master;
stop slave;

View File

@@ -11,7 +11,7 @@ ignore server id list:
change master to IGNORE_SERVER_IDS= (10, 100);
*** must be 10, 100 ***
ignore server id list: 10, 100
reset slave;
include/reset_slave.inc
*** must be empty due to reset slave ***
ignore server id list: 10, 100
change master to IGNORE_SERVER_IDS= (10, 100);
@@ -33,7 +33,7 @@ Tables_in_test
*** allowing events from master ***
stop slave;
include/wait_for_slave_to_stop.inc
reset slave;
include/reset_slave.inc
change master to IGNORE_SERVER_IDS= (10, 100);
*** the list must remain (10, 100) after reset slave ***
change master to IGNORE_SERVER_IDS= ();

View File

@@ -1,6 +1,11 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
connection slave;
CREATE USER 'nonsuperuser'@'127.0.0.1';
GRANT ALTER,CREATE,DELETE,DROP,EVENT,INSERT,PROCESS,REPLICATION SLAVE,
SELECT,UPDATE ON *.* TO 'nonsuperuser'@'127.0.0.1';

View File

@@ -30,6 +30,7 @@ include/wait_for_slave_io_to_stop.inc
include/wait_for_slave_sql_to_stop.inc
"Command: RESET SLAVE ALL --> RESET REPLICA ALL"
RESET REPLICA ALL;
set @@global.gtid_slave_pos= "";
connection master;
RESET MASTER;
CREATE TABLE t(f INT) ENGINE=INNODB;

View File

@@ -63,7 +63,7 @@ c d
3 27
STOP SLAVE;
include/wait_for_slave_to_stop.inc
RESET SLAVE;
include/reset_slave.inc
connection master;
RESET MASTER;
SET SESSION BINLOG_FORMAT=STATEMENT;

View File

@@ -1,6 +1,10 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection slave;
SET @old_debug_slave= @@global.debug;
stop slave;
SET GLOBAL slave_parallel_threads=4;

View File

@@ -49,7 +49,7 @@ connection master;
reset master;
connection slave;
stop slave;
reset slave;
include/reset_slave.inc
connection master;
connection slave;
lock tables t1 read;

View File

@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
SET GLOBAL max_binlog_cache_size = 4096;
SET GLOBAL binlog_cache_size = 4096;

View File

@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
change master to master_use_gtid=no;
include/start_slave.inc
connection master;
create table t1 (a int) ENGINE=MyISAM;
insert into t1 values (10);
create table t2 (a int) ENGINE=MyISAM;

View File

@@ -74,7 +74,9 @@ load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
connection slave;
include/wait_for_slave_sql_error.inc [errno=1062]
stop slave;
reset slave;
include/reset_slave.inc
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-14. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
include/check_slave_no_error.inc
connection master;
reset master;

View File

@@ -7,7 +7,7 @@ include/stop_slave.inc
change master to master_user='test';
Master_User = 'test'
Master_Host = '127.0.0.1'
reset slave;
include/reset_slave.inc
Master_User = 'test'
Master_Host = '127.0.0.1'
change master to master_user='root';
@@ -15,13 +15,13 @@ include/start_slave.inc
Master_User = 'root'
Master_Host = '127.0.0.1'
include/stop_slave.inc
reset slave;
include/reset_slave.inc
include/start_slave.inc
connection master;
create temporary table t1 (a int);
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
include/start_slave.inc
show status like 'slave_open_temp_tables';
Variable_name Value
@@ -30,7 +30,7 @@ connection master;
drop temporary table if exists t1;
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
include/check_slave_no_error.inc
change master to master_user='impossible_user_name';
start slave;
@@ -44,13 +44,14 @@ change master to master_user='impossible_user_name';
start slave;
include/wait_for_slave_io_error.inc [errno=1045]
include/stop_slave_sql.inc
reset slave;
include/reset_slave.inc
include/check_slave_no_error.inc
change master to master_user='root';
reset slave;
include/reset_slave.inc
include/start_slave.inc
include/stop_slave.inc
reset slave all;
set @@global.gtid_slave_pos= "";
start slave;
ERROR HY000: Misconfigured slave: MASTER_HOST was not set; Fix in config file or with CHANGE MASTER TO
CHANGE MASTER TO MASTER_HOST= 'MASTER_HOST', MASTER_USER= 'MASTER_USER', MASTER_PORT= MASTER_PORT;

View File

@@ -104,13 +104,15 @@ connection master;
RESET MASTER;
connection slave;
include/stop_slave.inc
CHANGE MASTER TO master_log_pos=MASTER_POS;
CHANGE MASTER TO master_log_pos=MASTER_POS, master_use_gtid=no;
START SLAVE;
include/wait_for_slave_param.inc [Last_IO_Errno]
Last_IO_Errno = '1236'
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
include/stop_slave.inc
RESET SLAVE;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
RESET MASTER;
connection slave;

View File

@@ -69,7 +69,9 @@ Note 1254 Slave is already running
connection slave;
include/stop_slave.inc
drop table if exists t1;
reset slave;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
connection master;
drop table if exists t1;

View File

@@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
# BUG#56118 STOP SLAVE does not wait till trx with CREATE TMP TABLE ends
#

View File

@@ -1,5 +1,9 @@
include/master-slave.inc
[connection master]
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
@@ -961,7 +965,9 @@ include/rpl_stop_server.inc [server_number=1]
include/rpl_start_server.inc [server_number=1]
--> Master binlog: Server ver: 5.0.16-debug-log, Binlog ver: 4
connection slave;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
START SLAVE;
SELECT MASTER_POS_WAIT('master-bin.000001', 513) >= 0;
MASTER_POS_WAIT('master-bin.000001', 513) >= 0
@@ -992,7 +998,9 @@ DROP TRIGGER trg1;
DROP TABLE t1;
DROP TABLE t2;
STOP SLAVE;
RESET SLAVE;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection master;
SHOW TABLES LIKE 't_';
Tables_in_test (t_)
@@ -1083,7 +1091,12 @@ drop table t1;
connection slave;
connection master;
include/rpl_reset.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
create table t1 ( f int ) engine = innodb;
create table log ( r int ) engine = myisam;

View File

@@ -0,0 +1,142 @@
include/master-slave.inc
[connection master]
#
# Slave default configuration should be Slave_Pos
connection slave;
#
# Ensure that a slave configured with Using_Gtid=Slave_Pos will remain
# as Slave_Pos after RESET SLAVE
include/stop_slave.inc
RESET SLAVE;
# No warning should be given because Slave_Pos never changed
SHOW WARNINGS;
Level Code Message
include/start_slave.inc
#
# Ensure that a slave configured with Using_Gtid=No will revert to its
# default of Slave_Pos after RESET SLAVE for a master which supports
# GTIDs
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
include/stop_slave.inc
RESET SLAVE;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
# A notification that Using_Gtid was reverted should exist
SHOW WARNINGS;
Level Code Message
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
include/start_slave.inc
# Clear SHOW WARNINGS
#
# If the primary does not support GTIDs (version < 10), the replica
# should fall back to Using_Gtid=No on slave start, and should not
# revert Using_Gtid to Slave_Pos after RESET SLAVE
include/stop_slave.inc
RESET SLAVE ALL;
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=1;
SET @saved_dbug= @@GLOBAL.debug_dbug;
set @@global.debug_dbug= "d,mock_mariadb_primary_v5_in_get_master_version";
include/start_slave.inc
# Replica should detect at start that the primary does not support GTIDs
# and fall-back to Using_Gtid=No
# Replica should have an informational message stating it is falling
# back to Using_Gtid=No
FOUND 1 /Falling back to Using_Gtid=No because master does not support GTIDs/ in mysqld.2.err
include/stop_slave.inc
RESET SLAVE;
# Replica should know that the primary does not support GTIDs and
# preserve Using_Gtid=No
# 'No' was not reverted and therefore no note should be added
SHOW WARNINGS;
Level Code Message
set @@global.debug_dbug= @saved_dbug;
include/start_slave.inc
#
# Ensure that a slave configured with Using_Gtid=Current_Pos will revert
# to its default of Slave_Pos after RESET SLAVE.
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=Current_Pos;
include/start_slave.inc
include/stop_slave.inc
RESET SLAVE;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
# A notification that Using_Gtid was reverted should exist
SHOW WARNINGS;
Level Code Message
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
include/start_slave.inc
# Clear SHOW WARNINGS
# The MTR include file rpl_change_topology.inc should implicitly set
# MASTER_USE_GTID=NO when provided with $rpl_master_log_file. Note that
# this will switch master and slave roles.
connection slave;
include/stop_slave.inc
include/rpl_change_topology.inc [new topology=2->1]
# connection 'master' is the slave in this comparison
connection master;
# Validating Using_Gtid=No..
# ..success
include/rpl_change_topology.inc [new topology=1->2]
# connection 'slave' is back to slave role
connection slave;
# Validating Using_Gtid=Slave_Pos..
# ..success
include/start_slave.inc
#
# The MTR include file reset_slave.inc should keep/delete GTID state
# when reset_slave_keep_gtid_state is set, respectively.
#
connection master;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1);
DROP TABLE t1;
include/save_master_gtid.inc
connection slave;
include/sync_with_master_gtid.inc
include/stop_slave.inc
# Tagging gtid_slave_pos before reset_slave.inc as old_slave_pos
# Using reset_slave_keep_gtid_state=1 should preserve GTID state
include/reset_slave.inc
# Tagging gtid_slave_pos after reset_slave.inc as new_slave_pos
# Validating old_slave_pos == new_slave_pos..
# ..success
# Using reset_slave_keep_gtid_state=0 should empty GTID state
include/reset_slave.inc
# Tagging gtid_slave_pos as new_slave_pos
# Validating new_slave_pos is empty..
# ..success
set global gtid_slave_pos="old_slave_pos";
include/start_slave.inc
#
# A replica issued CHANGE MASTER TO specified with log coordinates but
# not master_use_gtid=no should warn the user that Using_Gtid is being
# changed to No.
#
connection slave;
include/stop_slave.inc
CHANGE MASTER TO master_log_pos=io_log_pos, master_log_file='io_log_file';
Warnings:
Note 4190 CHANGE MASTER TO is implicitly changing the value of 'Using_Gtid' from 'Slave_Pos' to 'No'
include/start_slave.inc
#
# A replica issued CHANGE MASTER TO specified with log coordinates and
# master_use_gtid=Slave_Pos should warn the user that the log
# coordinates will be ignored.
#
connection slave;
include/stop_slave.inc
CHANGE MASTER TO master_log_pos=io_log_pos, master_log_file='io_log_file', master_use_gtid=Slave_Pos;
Warnings:
Note 1618 <MASTER_LOG_FILE> option ignored
Note 1618 <MASTER_LOG_POS> option ignored
CHANGE MASTER TO relay_log_pos=relay_log_pos, relay_log_file='relay_log_file', master_use_gtid=Slave_Pos;
Warnings:
Note 1618 <RELAY_LOG_FILE> option ignored
Note 1618 <RELAY_LOG_POS> option ignored
include/start_slave.inc
include/rpl_end.inc
#
# End of rpl_using_gtid_default.test

View File

@@ -38,7 +38,7 @@ include/diff_tables.inc [master:test.t1, slave:test.t1]
include/diff_tables.inc [master:test.t2, slave:test.t2]
DROP TABLE t2, t1;
connection slave;
CHANGE MASTER TO MASTER_LOG_FILE='LOG_FILE', MASTER_LOG_POS=LOG_POS;
CHANGE MASTER TO MASTER_LOG_FILE='LOG_FILE', MASTER_LOG_POS=LOG_POS, MASTER_USE_GTID=NO;
SET @@GLOBAL.innodb_limit_optimistic_insert_debug = @saved_innodb_limit_optimistic_insert_debug;
include/start_slave.inc
include/rpl_end.inc

View File

@@ -6,7 +6,7 @@ set global rpl_semi_sync_master_enabled = ON;
connection slave;
include/stop_slave.inc
set global rpl_semi_sync_slave_enabled = ON;
change master to master_log_file='master-bin.000002', master_log_pos = 320;
change master to master_log_file='master-bin.000002', master_log_pos = 320, master_use_gtid=no;
start slave;
include/wait_for_slave_io_error.inc [errno=1236]
connection master;
@@ -14,7 +14,9 @@ insert into t1 values (1);
reset master;
connection slave;
include/stop_slave.inc
reset slave;
include/reset_slave.inc
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
include/start_slave.inc
set global rpl_semi_sync_slave_enabled = OFF;
connection master;

View File

@@ -3,6 +3,12 @@
source include/master-slave.inc;
--connection slave
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
--source include/start_slave.inc
--connection master
create table t1 (n int not null auto_increment primary key);
insert into t1 values(NULL);
insert into t1 values(2);

View File

@@ -17,7 +17,7 @@ DROP TABLE IF EXISTS t1;
sync_slave_with_master;
STOP SLAVE;
--source include/wait_for_slave_to_stop.inc
RESET SLAVE;
--source include/reset_slave.inc
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';

View File

@@ -63,6 +63,9 @@
call mtr.add_suppression("Unsafe statement written to the binary log using statement format");
--connection slave
call mtr.add_suppression("Unsafe statement written to the binary log using statement format");
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
--source include/start_slave.inc
--connection master
@@ -371,7 +374,8 @@ CHANGE MASTER TO MASTER_DELAY = 71;
--source include/rpl_assert.inc
--source include/stop_slave.inc
RESET SLAVE;
--let $master_use_gtid_option= No
--source include/reset_slave.inc
--echo [on master]
--connection master
RESET MASTER;

View File

@@ -63,10 +63,10 @@ DROP TABLE t2;
--connection server_2
STOP SLAVE;
CHANGE MASTER TO MASTER_USE_GTID = NO, IGNORE_DOMAIN_IDS = ();
CHANGE MASTER TO IGNORE_DOMAIN_IDS = ();
--connection server_3
STOP SLAVE;
CHANGE MASTER TO MASTER_USE_GTID = NO, IGNORE_DOMAIN_IDS = ();
CHANGE MASTER TO IGNORE_DOMAIN_IDS = ();
--echo # End of test.

View File

@@ -54,7 +54,7 @@ START SLAVE;
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
MASTER_LOG_FILE="master-bin.000003", MASTER_LOG_POS=4;
MASTER_LOG_FILE="master-bin.000003", MASTER_LOG_POS=4, MASTER_USE_GTID=NO;
--source include/start_slave.inc
--sync_with_master
SELECT * FROM t1 ORDER BY a;
@@ -185,7 +185,8 @@ SELECT * FROM t1 ORDER BY a;
--echo *** Test that RESET SLAVE clears the Using_Gtid flag. ***
--source include/stop_slave.inc
RESET SLAVE;
--let $master_use_gtid_option= No
--source include/reset_slave.inc
--let $status_items= Using_Gtid
--source include/show_slave_status.inc
@@ -286,6 +287,7 @@ eval SELECT '$value' AS Gtid_Slave_Pos;
--source include/stop_slave.inc
DROP TABLE t1;
RESET SLAVE ALL;
CHANGE MASTER TO MASTER_USE_GTID=NO;
RESET MASTER;
SET GLOBAL gtid_slave_pos= "";

View File

@@ -2,6 +2,11 @@
--let $rpl_topology=1->2
--source include/rpl_init.inc
--connection server_2
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
--source include/start_slave.inc
--connection server_1
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
# Function to extract one GTID from a list.

View File

@@ -52,7 +52,7 @@ let $slave_net_timeout= query_get_value(SHOW VARIABLES LIKE 'slave_net_timeout',
let $slave_heartbeat_timeout= query_get_value(SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period', Value, 1);
let $result= query_get_value(SELECT $slave_net_timeout/$slave_heartbeat_timeout AS Result, Result, 1);
--echo slave_net_timeout/slave_heartbeat_timeout=$result
RESET SLAVE;
--source include/reset_slave.inc
--echo
# Reset slave set slave_heartbeat_timeout = slave_net_timeout/2
@@ -62,7 +62,7 @@ SET @@global.slave_net_timeout=30;
--enable_warnings
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=5;
RESET SLAVE;
--source include/reset_slave.inc
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
--echo
@@ -75,7 +75,7 @@ SET @@global.slave_net_timeout=50;
eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry;
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
SET @@global.slave_net_timeout=@restore_slave_net_timeout;
RESET SLAVE;
--source include/reset_slave.inc
--echo
# Set slave_net_timeout less than current value of slave_heartbeat_period
@@ -320,8 +320,10 @@ INSERT INTO t1 VALUES (1, 'on slave', NULL);
--connection master
INSERT INTO t1 VALUES (1, 'on master', NULL);
--connection slave
set sql_log_bin= 0;
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* error.* 1062");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
set sql_log_bin= 1;
let $slave_errno= ER_DUP_ENTRY
--source include/wait_for_slave_sql_error.inc
let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
@@ -330,7 +332,9 @@ let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_hea
let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) > 0 AS Result, Result, 1);
--echo Heartbeat events are received while sql thread stopped (1 means 'yes'): $result
--source include/stop_slave.inc
set sql_log_bin= 0;
DROP TABLE t1;
set sql_log_bin= 1;
--echo
# Check received heartbeat events while master send events to slave
@@ -346,7 +350,7 @@ CREATE EVENT e1
END|
DELIMITER ;|
--connection slave
RESET SLAVE;
--source include/reset_slave.inc
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=5;
--source include/start_slave.inc
@@ -404,8 +408,10 @@ DROP EVENT e1;
# Check received heartbeat events while logs flushed on slave
--echo *** Flush logs on slave ***
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
set sql_log_bin= 0;
DROP TABLE t1;
set sql_log_bin= 1;
--connection master
DROP TABLE t1;
RESET MASTER;
@@ -435,7 +441,7 @@ let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_b
SET @@global.slave_compressed_protocol=1;
--connection slave
--source include/stop_slave.inc
RESET SLAVE;
--source include/reset_slave.inc
SET @@global.slave_compressed_protocol=1;
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=0.1;
@@ -455,7 +461,7 @@ SET @@global.slave_compressed_protocol=0;
--echo *** Reset master ***
--connection slave
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=0.1;
--source include/start_slave.inc
@@ -474,7 +480,7 @@ let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_b
--echo *** Reload master ***
--connection slave
STOP SLAVE;
RESET SLAVE;
--source include/reset_slave.inc
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=0.1;
--source include/start_slave.inc

View File

@@ -29,7 +29,8 @@ eval CHANGE MASTER TO
MASTER_SSL=1,
MASTER_SSL_CA='$MYSQL_TEST_DIR/std_data/cacert.pem',
MASTER_SSL_CERT='$MYSQL_TEST_DIR/std_data/client-cert.pem',
MASTER_SSL_KEY='$MYSQL_TEST_DIR/std_data/client-key.pem';
MASTER_SSL_KEY='$MYSQL_TEST_DIR/std_data/client-key.pem',
MASTER_USE_GTID=NO;
--source include/start_slave.inc
# Check SSL state of slave
let $slave_ssl_status= query_get_value(SHOW SLAVE STATUS, Master_SSL_Allowed, 1);

View File

@@ -26,7 +26,7 @@ source include/stop_slave.inc;
let $wrong_log_pos= `SELECT $read_pos+2`;
--replace_result $wrong_log_pos MASTER_LOG_POS
eval change master to master_log_pos=$wrong_log_pos;
eval change master to master_log_pos=$wrong_log_pos, master_use_gtid=no;
start slave;
let $slave_io_errno= 1236;
--let $show_slave_io_error= 1
@@ -45,7 +45,7 @@ insert into t1 values (1),(2),(3);
save_master_pos;
connection slave;
--replace_result 4 MASTER_LOG_POS
change master to master_log_pos=4;
change master to master_log_pos=4, master_use_gtid=no;
start slave;
sync_with_master;
select * from t1 ORDER BY n;

View File

@@ -1,5 +1,11 @@
source include/master-slave.inc;
connection slave;
source include/stop_slave.inc;
CHANGE MASTER TO MASTER_USE_GTID=NO;
source include/start_slave.inc;
connection master;
#
# BUG#28421 Infinite loop on slave relay logs
#

View File

@@ -12,6 +12,12 @@ set @old_master_binlog_checksum= @@global.binlog_checksum;
#
# Test this by binlog rotation before we log any GTIDs.
connection slave;
# Need to stop/start the master without GTID before setting debug_dbug
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
--source include/start_slave.inc
--source include/stop_slave.inc
--echo # Test slave with no capability gets dummy event, which is ignored.
set @old_dbug= @@global.debug_dbug;

View File

@@ -29,7 +29,7 @@ SET GLOBAL default_storage_engine=InnoDB;
SET @old_parallel= @@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=12;
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;
--source include/start_slave.inc
--connection master

View File

@@ -42,7 +42,7 @@ SELECT * FROM t1;
# restart replication for the next testcase
stop slave;
--source include/wait_for_slave_to_stop.inc
reset slave;
--source include/reset_slave.inc
connection master;
reset master;
drop table t1;
@@ -161,7 +161,7 @@ SELECT * FROM t1;
# restart replication for the next testcase
stop slave;
--source include/wait_for_slave_to_stop.inc
reset slave;
--source include/reset_slave.inc
connection master;
reset master;
drop table t1;

View File

@@ -43,7 +43,7 @@ CREATE TABLE t1 (id SERIAL, a DATETIME(3));
--connection slave
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;
--source include/start_slave.inc

View File

@@ -47,7 +47,7 @@ CREATE TABLE t1 (id SERIAL, a DATETIME(3));
--connection slave
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;
--source include/start_slave.inc

View File

@@ -26,7 +26,7 @@
SET @old_parallel= @@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=10;
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;
# Block execution yet when the blocked query timestamp has been already accounted
FLUSH TABLES WITH READ LOCK;

Some files were not shown because too many files have changed in this diff Show More