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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
|
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]
call mtr.add_suppression(".* since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica. Statement: insert into t2 set data=repeat.*'a', @act_size.*");
call mtr.add_suppression(".* since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica. Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*");
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");
set @save_binlog_cache_size = @@global.binlog_cache_size;
set @save_binlog_checksum = @@global.binlog_checksum;
set @save_source_verify_checksum = @@global.source_verify_checksum;
set @@global.binlog_cache_size = 4096;
set @@global.binlog_checksum = CRC32;
set @@global.source_verify_checksum = 1;
include/sync_slave_sql_with_master.inc
include/stop_slave.inc
include/start_slave.inc
flush status;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 0
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 0
create table t1 (a int PRIMARY KEY, b CHAR(32)) engine=innodb;
create procedure test.p_init (n int, size int)
begin
while n > 0 do
select round(RAND() * size) into @act_size;
set @data = repeat('a', @act_size);
insert into t1 values(n, @data );
set n= n-1;
end while;
end|
begin;
call test.p_init(4000, 32);
commit;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 3
*** binlog_cache_disk_use must be non-zero ***
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1]
begin;
delete from t1;
commit;
include/sync_slave_sql_with_master.inc
flush status;
create table t2(a int auto_increment primary key, data VARCHAR(12288)) ENGINE=Innodb;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 2
*** binlog_cache_disk_use must be non-zero ***
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t2, slave:t2]
begin;
delete from t2;
commit;
include/sync_slave_sql_with_master.inc
flush status;
create table t3(a int auto_increment primary key, data VARCHAR(8192)) engine=innodb;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 2
*** binlog_cache_disk_use must be non-zero ***
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t3, slave:t3]
begin;
delete from t3;
commit;
include/sync_slave_sql_with_master.inc
flush status;
create procedure test.p1 (n int)
begin
while n > 0 do
case (select (round(rand()*100) % 3) + 1)
when 1 then
select round(RAND() * 32) into @act_size;
set @data = repeat('a', @act_size);
insert into t1 values(n, @data);
when 2 then
begin
select round(8192 + RAND() * 4096) into @act_size;
insert into t2 set data=repeat('a', @act_size);
end;
when 3 then
begin
select round(3686.4000 + RAND() * 819.2000) into @act_size;
insert into t3 set data= repeat('a', @act_size);
end;
end case;
set n= n-1;
end while;
end|
set autocommit= 0;
begin;
call test.p1(1000);
commit;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 2
*** binlog_cache_disk_use must be non-zero ***
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1]
include/diff_tables.inc [master:t2, slave:t2]
include/diff_tables.inc [master:t3, slave:t3]
begin;
delete from t1;
delete from t2;
delete from t3;
commit;
drop table t1, t2, t3;
set @@global.binlog_cache_size = @save_binlog_cache_size;
set @@global.binlog_checksum = @save_binlog_checksum;
set @@global.source_verify_checksum = @save_source_verify_checksum;
drop procedure test.p_init;
drop procedure test.p1;
include/rpl_end.inc
|