Skip to content

Commit f7ebf26

Browse files
author
Luis Soares
committed
auto merge from mysql-5.1-rep+3.
2 parents 6ef3875 + 7a8ab5f commit f7ebf26

File tree

8 files changed

+646
-10
lines changed

8 files changed

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