Skip to content

Commit 4902a22

Browse files
author
Alexander Nozdrin
committed
Manual merge from mysql-trunk-merge.
Conflicts: - mysql-test/collections/default.experimental - mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result - mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test --BZR-- revision-id: [email protected] property-branch-nick: mysql-next-mr-merge.3 testament3-sha1: 728ffcb074262959de8de061d8b6dbcb6676de04
2 parents a25e698 + f861643 commit 4902a22

16 files changed

Lines changed: 253 additions & 26 deletions

.bzrfileids

723 Bytes
Binary file not shown.

include/my_stacktrace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
(defined(__alpha__) && defined(__GNUC__))
2424
#define HAVE_STACKTRACE 1
2525
#endif
26-
#elif defined(__WIN__) || defined(__sun)
26+
#elif defined(__WIN__) || defined(HAVE_PRINTSTACK)
2727
#define HAVE_STACKTRACE 1
2828
#endif
2929

mysql-test/collections/default.experimental

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ main.sp @solaris # Bug#47791 2010-01-20 alik Several tes
1919
perfschema.tampered_perfschema_table1 @windows # Bug#50478 2010-01-20 alik perfschema.tampered_perfschema_table1 fails sporadically on Windows and Solaris
2020
perfschema.tampered_perfschema_table1 @solaris # Bug#50478 2010-01-20 alik perfschema.tampered_perfschema_table1 fails sporadically on Windows and Solaris
2121

22-
rpl.rpl_get_master_version_and_clock* # Bug#49191 2009-12-01 Daogang rpl_get_master_version_and_clock failed on PB2: COM_REGISTER_SLAVE failed
2322
rpl.rpl_heartbeat_basic # BUG#43828 2009-10-22 luis fails sporadically
2423
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically
2524
rpl.rpl_innodb_bug28430* # Bug#46029
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Both of the following tests check that comparison of binlog BI
2+
# against SE record will not fail due to remains from previous values
3+
# in the SE record (before a given field was set to null).
4+
#
5+
# In MIXED mode:
6+
# - Insert and update are executed as statements
7+
# - Delete is executed as a row event
8+
# - Assertion: checks that comparison will not fail because the update
9+
# statement will clear the record contents for the nulled
10+
# field. If data was not cleared, some engines may keep
11+
# the value and return it later as garbage - despite the
12+
# fact that field is null. This may cause slave to
13+
# falsely fail in the comparison (memcmp would fail
14+
# because of "garbage" in record data).
15+
#
16+
# In ROW mode:
17+
# - Insert, update and delete are executed as row events.
18+
# - Assertion: checks that comparison will not fail because the update
19+
# rows event will clear the record contents before
20+
# feeding the new value to the SE. This protects against
21+
# SEs that do not clear record contents when storing
22+
# nulled fields. If the engine did not clear the data it
23+
# would cause slave to falsely fail in the comparison
24+
# (memcmp would fail because of "garbage" in record
25+
# data). This scenario is pretty much the same described
26+
# above in MIXED mode, but checks different execution
27+
# path in the slave.
28+
29+
# BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on
30+
# delete cant find record
31+
32+
-- source include/master-slave-reset.inc
33+
34+
-- connection master
35+
-- eval CREATE TABLE t1 (c1 BIT, c2 INT) Engine=$engine
36+
INSERT INTO `t1` VALUES ( 1, 1 );
37+
UPDATE t1 SET c1=NULL where c2=1;
38+
-- sync_slave_with_master
39+
40+
-- let $diff_table_1=master:test.t1
41+
-- let $diff_table_2=slave:test.t1
42+
-- source include/diff_tables.inc
43+
44+
-- connection master
45+
# triggers switch to row mode when on mixed
46+
DELETE FROM t1 WHERE c2=1 LIMIT 1;
47+
-- sync_slave_with_master
48+
49+
-- let $diff_table_1=master:test.t1
50+
-- let $diff_table_2=slave:test.t1
51+
-- source include/diff_tables.inc
52+
53+
-- connection master
54+
DROP TABLE t1;
55+
-- sync_slave_with_master
56+
57+
-- source include/master-slave-reset.inc
58+
59+
-- connection master
60+
61+
# BUG#49482: RBR: Replication may break on deletes when MyISAM tables
62+
# + char field are used
63+
64+
-- eval CREATE TABLE t1 (c1 CHAR) Engine=$engine
65+
66+
INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ;
67+
SELECT * FROM t1;
68+
UPDATE t1 SET c1=NULL WHERE c1='w';
69+
-- sync_slave_with_master
70+
71+
-- let $diff_table_1=master:test.t1
72+
-- let $diff_table_2=slave:test.t1
73+
-- source include/diff_tables.inc
74+
75+
-- connection master
76+
# triggers switch to row mode when on mixed
77+
DELETE FROM t1 LIMIT 2;
78+
-- sync_slave_with_master
79+
80+
-- let $diff_table_1=master:test.t1
81+
-- let $diff_table_2=slave:test.t1
82+
-- source include/diff_tables.inc
83+
84+
-- connection master
85+
DROP TABLE t1;
86+
-- sync_slave_with_master

mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ reset master;
44
reset slave;
55
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
66
start slave;
7+
call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: .*");
78
call mtr.add_suppression("Slave I/O: .* failed with error: Lost connection to MySQL server at 'reading initial communication packet'");
8-
call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again");
9-
call mtr.add_suppression("Get master clock failed with error: ");
10-
call mtr.add_suppression("Get master SERVER_ID failed with error: ");
119
call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*");
10+
call mtr.add_suppression("Slave I/O thread .* register on master");
1211
SELECT IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP");
1312
IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP")
1413
1
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
stop slave;
2+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
3+
reset master;
4+
reset slave;
5+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
6+
start slave;
7+
stop slave;
8+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
9+
reset master;
10+
reset slave;
11+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
12+
start slave;
13+
CREATE TABLE t1 (c1 BIT, c2 INT) Engine=InnoDB;
14+
INSERT INTO `t1` VALUES ( 1, 1 );
15+
UPDATE t1 SET c1=NULL where c2=1;
16+
Comparing tables master:test.t1 and slave:test.t1
17+
DELETE FROM t1 WHERE c2=1 LIMIT 1;
18+
Comparing tables master:test.t1 and slave:test.t1
19+
DROP TABLE t1;
20+
stop slave;
21+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
22+
reset master;
23+
reset slave;
24+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
25+
start slave;
26+
CREATE TABLE t1 (c1 CHAR) Engine=InnoDB;
27+
INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ;
28+
SELECT * FROM t1;
29+
c1
30+
w
31+
UPDATE t1 SET c1=NULL WHERE c1='w';
32+
Comparing tables master:test.t1 and slave:test.t1
33+
DELETE FROM t1 LIMIT 2;
34+
Comparing tables master:test.t1 and slave:test.t1
35+
DROP TABLE t1;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
stop slave;
2+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
3+
reset master;
4+
reset slave;
5+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
6+
start slave;
7+
stop slave;
8+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
9+
reset master;
10+
reset slave;
11+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
12+
start slave;
13+
CREATE TABLE t1 (c1 BIT, c2 INT) Engine=MyISAM;
14+
INSERT INTO `t1` VALUES ( 1, 1 );
15+
UPDATE t1 SET c1=NULL where c2=1;
16+
Comparing tables master:test.t1 and slave:test.t1
17+
DELETE FROM t1 WHERE c2=1 LIMIT 1;
18+
Comparing tables master:test.t1 and slave:test.t1
19+
DROP TABLE t1;
20+
stop slave;
21+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
22+
reset master;
23+
reset slave;
24+
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
25+
start slave;
26+
CREATE TABLE t1 (c1 CHAR) Engine=MyISAM;
27+
INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ;
28+
SELECT * FROM t1;
29+
c1
30+
w
31+
UPDATE t1 SET c1=NULL WHERE c1='w';
32+
Comparing tables master:test.t1 and slave:test.t1
33+
DELETE FROM t1 LIMIT 2;
34+
Comparing tables master:test.t1 and slave:test.t1
35+
DROP TABLE t1;

mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@
1717
source include/master-slave.inc;
1818
source include/have_debug.inc;
1919

20+
connection slave;
21+
call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: .*");
2022
call mtr.add_suppression("Slave I/O: .* failed with error: Lost connection to MySQL server at 'reading initial communication packet'");
21-
call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again");
22-
call mtr.add_suppression("Get master clock failed with error: ");
23-
call mtr.add_suppression("Get master SERVER_ID failed with error: ");
2423
call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*");
24+
call mtr.add_suppression("Slave I/O thread .* register on master");
2525

2626
#Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection
27-
connection slave;
2827
let $debug_saved= `select @@global.debug`;
2928

3029
let $debug_lock= "debug_lock.before_get_UNIX_TIMESTAMP";
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- source include/have_binlog_format_mixed_or_row.inc
2+
-- source include/master-slave.inc
3+
-- source include/have_innodb.inc
4+
5+
-- let $engine= InnoDB
6+
-- source extra/rpl_tests/rpl_set_null.test
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- source include/have_binlog_format_mixed_or_row.inc
2+
-- source include/master-slave.inc
3+
4+
-- let $engine= MyISAM
5+
-- source extra/rpl_tests/rpl_set_null.test

0 commit comments

Comments
 (0)