Skip to content

Commit 68e5d6a

Browse files
committed
Do not truncate integers on 32-bit systems in Rows_event_tracker
commit 3dc3ab1 introduced Rows_event_tracker, using a mismatch of size_t (the native register width) and my_off_t (the file offset width, usually 64 bits). Use my_off_t both in member fields and member functions.
1 parent bec2712 commit 68e5d6a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sql/rpl_mi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ typedef struct st_rows_event_tracker
139139
my_off_t first_seen;
140140
my_off_t last_seen;
141141
bool stmt_end_seen;
142-
void update(const char* file_name, size_t pos,
142+
void update(const char* file_name, my_off_t pos,
143143
const char* buf,
144144
const Format_description_log_event *fdle);
145145
void reset();
146-
bool check_and_report(const char* file_name, size_t pos);
146+
bool check_and_report(const char* file_name, my_off_t pos);
147147
} Rows_event_tracker;
148148

149149
/*****************************************************************************

sql/slave.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7650,7 +7650,7 @@ void Rows_event_tracker::reset()
76507650
well as the end-of-statement status of the last one.
76517651
*/
76527652

7653-
void Rows_event_tracker::update(const char* file_name, size_t pos,
7653+
void Rows_event_tracker::update(const char* file_name, my_off_t pos,
76547654
const char* buf,
76557655
const Format_description_log_event *fdle)
76567656
{
@@ -7675,7 +7675,7 @@ void Rows_event_tracker::update(const char* file_name, size_t pos,
76757675
false otherwise.
76767676
*/
76777677
bool Rows_event_tracker::check_and_report(const char* file_name,
7678-
size_t pos)
7678+
my_off_t pos)
76797679
{
76807680
if (last_seen)
76817681
{

0 commit comments

Comments
 (0)