1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
include/master-slave.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
[connection master]
SET @old_innodb_flush_log_at_trx_commit= @@global.innodb_flush_log_at_trx_commit;
SET @@global.innodb_flush_log_at_trx_commit= 0;
SET @old_innodb_flush_log_at_trx_commit= @@global.innodb_flush_log_at_trx_commit;
SET @@global.innodb_flush_log_at_trx_commit= 0;
SET @@session.binlog_direct_non_transactional_updates= FALSE;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
create table t1i(n int primary key) engine=innodb;
create table t2m(n int primary key) engine=myisam;
begin;
insert into t1i values (1);
insert into t1i values (2);
insert into t1i values (3);
commit;
begin;
insert into t1i values (5);
begin;
insert into t1i values (4);
insert into t2m values (1);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
insert into t1i values (5);
commit;
zero
0
stop slave;
rollback;
Warnings:
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
include/wait_for_slave_to_stop.inc
*** sql thread is *not* running: No ***
*** the prove: the stopped slave has finished the current transaction ***
five
5
zero
0
one
1
include/start_slave.inc
drop table t1i, t2m;
#
# Bug#56096 STOP SLAVE hangs if executed in parallel with user sleep
#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT );
# Slave1: lock table for synchronization
LOCK TABLES t1 WRITE;
# Master: insert into the table
INSERT INTO t1 SELECT SLEEP(4);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
# Slave: wait for the insert
# Slave: send slave stop
STOP SLAVE;
# Slave1: wait for stop slave
# Slave1: unlock the table
UNLOCK TABLES;
# Slave: wait for the slave to stop
Warnings:
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
include/wait_for_slave_to_stop.inc
# Start slave again
include/start_slave.inc
# Clean up
DROP TABLE t1;
RESET MASTER;
include/stop_slave.inc
CHANGE REPLICATION SOURCE TO SOURCE_LOG_POS=MASTER_POS;
START SLAVE;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_param.inc [Last_IO_Errno]
Last_IO_Errno = '13114'
Last_IO_Error = 'Got fatal error 1236 from source when reading data from binary log: 'Client requested source to start replication from position > file size''
include/stop_slave.inc
RESET SLAVE;
Warnings:
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
RESET MASTER;
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
call mtr.add_suppression("Replica SQL.*Request to stop replica SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
call mtr.add_suppression("Unsafe statement.*. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.*");
call mtr.add_suppression("Unsafe statement.*. Statement is unsafe because it uses a system function that may return a different value on the replica.*");
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
include/rpl_end.inc
|