~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/r/rpl_checksum_cache.result

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2013-12-22 10:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20131222102705-mndw7s12mz0szrcn
Tags: upstream-5.5.32
Import upstream version 5.5.32

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
include/master-slave.inc
 
2
[connection master]
 
3
call mtr.add_suppression("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 slave. Statement: insert into t2 set data=repeat.*'a', @act_size.*");
 
4
call mtr.add_suppression("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 slave. Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*");
 
5
set @save_binlog_cache_size = @@global.binlog_cache_size;
 
6
set @save_binlog_checksum = @@global.binlog_checksum;
 
7
set @save_master_verify_checksum = @@global.master_verify_checksum;
 
8
set @@global.binlog_cache_size = 4096;
 
9
set @@global.binlog_checksum = CRC32;
 
10
set @@global.master_verify_checksum = 1;
 
11
include/stop_slave.inc
 
12
include/start_slave.inc
 
13
flush status;
 
14
show status like "binlog_cache_use";
 
15
Variable_name   Value
 
16
Binlog_cache_use        0
 
17
show status like "binlog_cache_disk_use";
 
18
Variable_name   Value
 
19
Binlog_cache_disk_use   0
 
20
drop table if exists t1;
 
21
create table t1 (a int PRIMARY KEY, b CHAR(32)) engine=innodb;
 
22
create procedure test.p_init (n int, size int) 
 
23
begin
 
24
while n > 0 do
 
25
select round(RAND() * size) into @act_size;
 
26
set @data = repeat('a', @act_size);
 
27
insert into t1 values(n, @data );
 
28
set n= n-1;
 
29
end while;
 
30
end|
 
31
begin;
 
32
call test.p_init(4000, 32);
 
33
commit;
 
34
show status like "binlog_cache_use";
 
35
Variable_name   Value
 
36
Binlog_cache_use        1
 
37
*** binlog_cache_disk_use must be non-zero ***
 
38
show status like "binlog_cache_disk_use";
 
39
Variable_name   Value
 
40
Binlog_cache_disk_use   1
 
41
include/diff_tables.inc [master:test.t1, slave:test.t1]
 
42
begin;
 
43
delete from t1;
 
44
commit;
 
45
flush status;
 
46
create table t2(a int auto_increment primary key, data VARCHAR(12288)) ENGINE=Innodb;
 
47
show status like "binlog_cache_use";
 
48
Variable_name   Value
 
49
Binlog_cache_use        1
 
50
*** binlog_cache_disk_use must be non-zero ***
 
51
show status like "binlog_cache_disk_use";
 
52
Variable_name   Value
 
53
Binlog_cache_disk_use   1
 
54
include/diff_tables.inc [master:test.t2, slave:test.t2]
 
55
begin;
 
56
delete from t2;
 
57
commit;
 
58
flush status;
 
59
create table t3(a int auto_increment primary key, data VARCHAR(8192)) engine=innodb;
 
60
show status like "binlog_cache_use";
 
61
Variable_name   Value
 
62
Binlog_cache_use        1
 
63
*** binlog_cache_disk_use must be non-zero ***
 
64
show status like "binlog_cache_disk_use";
 
65
Variable_name   Value
 
66
Binlog_cache_disk_use   1
 
67
include/diff_tables.inc [master:test.t3, slave:test.t3]
 
68
begin;
 
69
delete from t3;
 
70
commit;
 
71
flush status;
 
72
create procedure test.p1 (n int) 
 
73
begin
 
74
while n > 0 do
 
75
case (select (round(rand()*100) % 3) + 1)
 
76
when 1 then
 
77
select round(RAND() * 32) into @act_size;
 
78
set @data = repeat('a', @act_size);
 
79
insert into t1 values(n, @data);
 
80
when 2 then
 
81
begin
 
82
select round(8192 + RAND() * 4096) into @act_size;
 
83
insert into t2 set data=repeat('a', @act_size);
 
84
end;
 
85
when 3 then
 
86
begin
 
87
select round(3686.4000 + RAND() * 819.2000) into @act_size;
 
88
insert into t3 set data= repeat('a', @act_size);
 
89
end;
 
90
end case;
 
91
set n= n-1;
 
92
end while;
 
93
end|
 
94
set autocommit= 0;
 
95
begin;
 
96
call test.p1(1000);
 
97
commit;
 
98
show status like "binlog_cache_use";
 
99
Variable_name   Value
 
100
Binlog_cache_use        1
 
101
*** binlog_cache_disk_use must be non-zero ***
 
102
show status like "binlog_cache_disk_use";
 
103
Variable_name   Value
 
104
Binlog_cache_disk_use   1
 
105
include/diff_tables.inc [master:test.t1, slave:test.t1]
 
106
include/diff_tables.inc [master:test.t2, slave:test.t2]
 
107
include/diff_tables.inc [master:test.t3, slave:test.t3]
 
108
begin;
 
109
delete from t1;
 
110
delete from t2;
 
111
delete from t3;
 
112
commit;
 
113
drop table t1, t2, t3;
 
114
set @@global.binlog_cache_size = @save_binlog_cache_size;
 
115
set @@global.binlog_checksum = @save_binlog_checksum;
 
116
set @@global.master_verify_checksum = @save_master_verify_checksum;
 
117
drop procedure test.p_init;
 
118
drop procedure test.p1;
 
119
include/rpl_end.inc