summaryrefslogtreecommitdiff
path: root/storage/innobase/rem/rem0rec.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2023-05-17 14:58:11 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2023-05-17 14:58:11 +0200
commit2543673dd22782f59299fd2e72179601892bd967 (patch)
treeb73641bd88c9d1572203c75da618fce1937518e8 /storage/innobase/rem/rem0rec.cc
parent4e5b771e980edfdad5c5414aa62c81d409d585a4 (diff)
parentef911553f442cbb1baaac2af44c38b54fd058c41 (diff)
downloadmariadb-git-bb-11.1-release.tar.gz
Merge branch '11.0' into 11.1bb-11.1-release
Diffstat (limited to 'storage/innobase/rem/rem0rec.cc')
-rw-r--r--storage/innobase/rem/rem0rec.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc
index f489669b408..3f8e48763ea 100644
--- a/storage/innobase/rem/rem0rec.cc
+++ b/storage/innobase/rem/rem0rec.cc
@@ -242,9 +242,9 @@ enum rec_leaf_format {
REC_LEAF_INSTANT
};
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ < 11
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ < 12
# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wconversion" /* GCC 5 to 10 need this */
+# pragma GCC diagnostic ignored "-Wconversion" /* GCC 5 to 11 need this */
#endif
/** Determine the offset to each field in a leaf-page record
in ROW_FORMAT=COMPACT,DYNAMIC,COMPRESSED.
@@ -291,7 +291,9 @@ rec_init_offsets_comp_ordinary(
!= n_core)
? UT_BITS_IN_BYTES(unsigned(index->get_n_nullable(n_core)))
: (redundant_temp
- ? UT_BITS_IN_BYTES(index->n_nullable)
+ ? (index->is_instant()
+ ? UT_BITS_IN_BYTES(index->get_n_nullable(n_core))
+ : UT_BITS_IN_BYTES(index->n_nullable))
: index->n_core_null_bytes);
if (mblob) {
@@ -448,7 +450,7 @@ start:
continue;
}
- len = offs += len;
+ len = offs += static_cast<rec_offs>(len);
} else {
len = offs += field->fixed_len;
}