Skip to content

Commit cddae24

Browse files
author
Luis Soares
committed
automerge: local bug branch --> mysql-5.1-rep+3 latest.
2 parents 9b0ae85 + d4ae3e2 commit cddae24

File tree

8 files changed

+644
-10
lines changed

8 files changed

+644
-10
lines changed
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
SET @positive= 18446744073709551615;
2+
SET @negative= -9223372036854775808;
3+
CREATE TABLE t1 (`tinyint` TINYINT,
4+
`smallint` SMALLINT,
5+
`mediumint` MEDIUMINT,
6+
`integer` INTEGER,
7+
`bigint` BIGINT,
8+
`utinyint` TINYINT UNSIGNED,
9+
`usmallint` SMALLINT UNSIGNED,
10+
`umediumint` MEDIUMINT UNSIGNED,
11+
`uinteger` INTEGER UNSIGNED,
12+
`ubigint` BIGINT UNSIGNED,
13+
`double` DOUBLE,
14+
`float` FLOAT,
15+
`real` REAL(30,2),
16+
`decimal` DECIMAL(30,2)) ENGINE = MyISAM;
17+
### insert max unsigned
18+
### a) declarative
19+
INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);;
20+
TRUNCATE t1;
21+
### b) user var
22+
INSERT INTO t1 VALUES (@positive,
23+
@positive,
24+
@positive,
25+
@positive,
26+
@positive,
27+
@positive,
28+
@positive,
29+
@positive,
30+
@positive,
31+
@positive,
32+
@positive,
33+
@positive,
34+
@positive,
35+
@positive);
36+
## assertion: checks that User_var_log_event::pack_info
37+
## correctly displays the binlog content by taking into
38+
## account the unsigned_flag
39+
show binlog events from <binlog_start>;
40+
Log_name Pos Event_type Server_id End_log_pos Info
41+
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (`tinyint` TINYINT,
42+
`smallint` SMALLINT,
43+
`mediumint` MEDIUMINT,
44+
`integer` INTEGER,
45+
`bigint` BIGINT,
46+
`utinyint` TINYINT UNSIGNED,
47+
`usmallint` SMALLINT UNSIGNED,
48+
`umediumint` MEDIUMINT UNSIGNED,
49+
`uinteger` INTEGER UNSIGNED,
50+
`ubigint` BIGINT UNSIGNED,
51+
`double` DOUBLE,
52+
`float` FLOAT,
53+
`real` REAL(30,2),
54+
`decimal` DECIMAL(30,2)) ENGINE = MyISAM
55+
master-bin.000001 # Query # # BEGIN
56+
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615)
57+
master-bin.000001 # Query # # COMMIT
58+
master-bin.000001 # Query # # use `test`; TRUNCATE t1
59+
master-bin.000001 # Query # # BEGIN
60+
master-bin.000001 # User var # # @`positive`=18446744073709551615
61+
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@positive,
62+
@positive,
63+
@positive,
64+
@positive,
65+
@positive,
66+
@positive,
67+
@positive,
68+
@positive,
69+
@positive,
70+
@positive,
71+
@positive,
72+
@positive,
73+
@positive,
74+
@positive)
75+
master-bin.000001 # Query # # COMMIT
76+
### insert min signed
77+
### a) declarative
78+
INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);;
79+
TRUNCATE t1;
80+
### b) user var
81+
INSERT INTO t1 VALUES (@negative,
82+
@negative,
83+
@negative,
84+
@negative,
85+
@negative,
86+
@negative,
87+
@negative,
88+
@negative,
89+
@negative,
90+
@negative,
91+
@negative,
92+
@negative,
93+
@negative,
94+
@negative);
95+
## assertion: checks that User_var_log_event::pack_info
96+
## correctly displays the binlog content by taking into
97+
## account the unsigned_flag
98+
show binlog events from <binlog_start>;
99+
Log_name Pos Event_type Server_id End_log_pos Info
100+
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (`tinyint` TINYINT,
101+
`smallint` SMALLINT,
102+
`mediumint` MEDIUMINT,
103+
`integer` INTEGER,
104+
`bigint` BIGINT,
105+
`utinyint` TINYINT UNSIGNED,
106+
`usmallint` SMALLINT UNSIGNED,
107+
`umediumint` MEDIUMINT UNSIGNED,
108+
`uinteger` INTEGER UNSIGNED,
109+
`ubigint` BIGINT UNSIGNED,
110+
`double` DOUBLE,
111+
`float` FLOAT,
112+
`real` REAL(30,2),
113+
`decimal` DECIMAL(30,2)) ENGINE = MyISAM
114+
master-bin.000001 # Query # # BEGIN
115+
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615)
116+
master-bin.000001 # Query # # COMMIT
117+
master-bin.000001 # Query # # use `test`; TRUNCATE t1
118+
master-bin.000001 # Query # # BEGIN
119+
master-bin.000001 # User var # # @`positive`=18446744073709551615
120+
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@positive,
121+
@positive,
122+
@positive,
123+
@positive,
124+
@positive,
125+
@positive,
126+
@positive,
127+
@positive,
128+
@positive,
129+
@positive,
130+
@positive,
131+
@positive,
132+
@positive,
133+
@positive)
134+
master-bin.000001 # Query # # COMMIT
135+
master-bin.000001 # Query # # BEGIN
136+
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808)
137+
master-bin.000001 # Query # # COMMIT
138+
master-bin.000001 # Query # # use `test`; TRUNCATE t1
139+
master-bin.000001 # Query # # BEGIN
140+
master-bin.000001 # User var # # @`negative`=-9223372036854775808
141+
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@negative,
142+
@negative,
143+
@negative,
144+
@negative,
145+
@negative,
146+
@negative,
147+
@negative,
148+
@negative,
149+
@negative,
150+
@negative,
151+
@negative,
152+
@negative,
153+
@negative,
154+
@negative)
155+
master-bin.000001 # Query # # COMMIT
156+
DROP TABLE t1;
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
-- source include/have_binlog_format_statement.inc
2+
#
3+
# BUG#49562: SBR out of sync when using numeric data types + user variable
4+
#
5+
6+
-- let $max_unsigned_long= 18446744073709551615
7+
-- let $min_signed_long= -9223372036854775808
8+
-- eval SET @positive= $max_unsigned_long
9+
-- eval SET @negative= $min_signed_long
10+
11+
CREATE TABLE t1 (`tinyint` TINYINT,
12+
`smallint` SMALLINT,
13+
`mediumint` MEDIUMINT,
14+
`integer` INTEGER,
15+
`bigint` BIGINT,
16+
`utinyint` TINYINT UNSIGNED,
17+
`usmallint` SMALLINT UNSIGNED,
18+
`umediumint` MEDIUMINT UNSIGNED,
19+
`uinteger` INTEGER UNSIGNED,
20+
`ubigint` BIGINT UNSIGNED,
21+
`double` DOUBLE,
22+
`float` FLOAT,
23+
`real` REAL(30,2),
24+
`decimal` DECIMAL(30,2)) ENGINE = MyISAM;
25+
26+
-- echo ### insert max unsigned
27+
-- echo ### a) declarative
28+
-- disable_warnings
29+
-- eval INSERT INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long);
30+
-- enable_warnings
31+
TRUNCATE t1;
32+
33+
-- echo ### b) user var
34+
-- disable_warnings
35+
INSERT INTO t1 VALUES (@positive,
36+
@positive,
37+
@positive,
38+
@positive,
39+
@positive,
40+
@positive,
41+
@positive,
42+
@positive,
43+
@positive,
44+
@positive,
45+
@positive,
46+
@positive,
47+
@positive,
48+
@positive);
49+
-- enable_warnings
50+
51+
-- echo ## assertion: checks that User_var_log_event::pack_info
52+
-- echo ## correctly displays the binlog content by taking into
53+
-- echo ## account the unsigned_flag
54+
-- source include/show_binlog_events.inc
55+
56+
-- echo ### insert min signed
57+
-- echo ### a) declarative
58+
-- disable_warnings
59+
-- eval INSERT INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long);
60+
-- enable_warnings
61+
TRUNCATE t1;
62+
63+
-- echo ### b) user var
64+
-- disable_warnings
65+
INSERT INTO t1 VALUES (@negative,
66+
@negative,
67+
@negative,
68+
@negative,
69+
@negative,
70+
@negative,
71+
@negative,
72+
@negative,
73+
@negative,
74+
@negative,
75+
@negative,
76+
@negative,
77+
@negative,
78+
@negative);
79+
-- enable_warnings
80+
81+
-- echo ## assertion: checks that User_var_log_event::pack_info
82+
-- echo ## correctly displays the binlog content by taking into
83+
-- echo ## account the unsigned_flag
84+
-- source include/show_binlog_events.inc
85+
86+
DROP TABLE t1;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Master_User root
118118
Master_Port MASTER_PORT
119119
Connect_Retry 1
120120
Master_Log_File master-bin.000001
121-
Read_Master_Log_Pos 386
121+
Read_Master_Log_Pos 387
122122
Relay_Log_File #
123123
Relay_Log_Pos #
124124
Relay_Master_Log_File master-bin.000001
@@ -133,7 +133,7 @@ Replicate_Wild_Ignore_Table
133133
Last_Errno 0
134134
Last_Error
135135
Skip_Counter 0
136-
Exec_Master_Log_Pos 386
136+
Exec_Master_Log_Pos 387
137137
Relay_Log_Space #
138138
Until_Condition None
139139
Until_Log_File

0 commit comments

Comments
 (0)