Skip to content

Instantly share code, notes, and snippets.

@spetrunia
Created April 13, 2023 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spetrunia/872fbe104412a0eec78a1c6f7c9222cb to your computer and use it in GitHub Desktop.
Save spetrunia/872fbe104412a0eec78a1c6f7c9222cb to your computer and use it in GitHub Desktop.
diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc
index f489669b408..ea87750e5bc 100644
--- a/storage/innobase/rem/rem0rec.cc
+++ b/storage/innobase/rem/rem0rec.cc
@@ -437,7 +437,7 @@ rec_init_offsets_comp_ordinary(
if (UNIV_UNLIKELY(len & 0x80) && DATA_BIG_COL(col)) {
/* 1exxxxxxx xxxxxxxx */
len <<= 8;
- len |= *lens--;
+ len |= (rec_offs)*lens--;
static_assert(STORED_OFFPAGE == 0x4000, "");
static_assert(REC_OFFS_EXTERNAL == 0x4000, "");
const rec_offs ext = len & REC_OFFS_EXTERNAL;
@@ -720,7 +720,7 @@ rec_init_offsets(
&& DATA_BIG_COL(col)) {
/* 1exxxxxxx xxxxxxxx */
len <<= 8;
- len |= *lens--;
+ len |= (rec_offs)*lens--;
/* B-tree node pointers
must not contain externally
@@ -1024,7 +1024,7 @@ rec_get_offsets_reverse(
/* 1exxxxxxx xxxxxxxx */
len &= 0x7f;
len <<= 8;
- len |= *lens++;
+ len |= (rec_offs)*lens++;
static_assert(STORED_OFFPAGE == 0x4000, "");
static_assert(REC_OFFS_EXTERNAL == 0x4000, "");
rec_offs ext = len & REC_OFFS_EXTERNAL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment