summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
authorAndrei Elkin <andrei.elkin@mariadb.com>2019-01-10 16:32:56 +0200
committerAndrei Elkin <andrei.elkin@mariadb.com>2019-01-22 14:55:28 +0200
commit4e289806b2b0aca7e37057511843e18be1041eb0 (patch)
tree6fa7da1f763cae3e6d8dd2d1634ddd3ebcfd7781 /sql/table.h
parent6786fb004c5f88f2d4da6534c49456e90676274d (diff)
downloadmariadb-git-bb-10.0-andrei.tar.gz
MDEV-17803 Row-based event is not applied when table map id is greaterbb-10.0-andrei
32 bit int Row-based slave applier could not parse correctly the table id when the value exceeded the max of 32 bit unsigned int. The reason turns out in that the being parsed value placeholder was sized as 4 bytes. The type is fixed to ulonglong. Additionally the patch works around Rows_log_event::m_table_id 4 bytes size on 32 bits platforms. In case of last_table_id value overflows the 4 byte max, there won't be the zero value for m_table_id generated and the first wrapped-around value is one, this is thanks to excluding UINT_MAX32 + 1 from TABLE_SHARE::table_map_id.
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/table.h b/sql/table.h
index 4a1552f8c0d..10c1d1bc68e 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1816,7 +1816,7 @@ struct TABLE_LIST
/* Index names in a "... JOIN ... USE/IGNORE INDEX ..." clause. */
List<Index_hint> *index_hints;
TABLE *table; /* opened table */
- uint table_id; /* table id (from binlog) for opened table */
+ ulonglong table_id; /* table id (from binlog) for opened table */
/*
select_result for derived table to pass it from table creation to table
filling procedure