summaryrefslogtreecommitdiff
path: root/storage/innobase/include/rem0rec.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-07-02 07:39:33 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-07-02 07:39:33 +0300
commitf347b3e0e6592329b1447fa460aca0a4b1f680b1 (patch)
treec671aced17dc9f6d0cc6c5a660b73b2e2dcfe841 /storage/innobase/include/rem0rec.h
parentb0f836053b094b09999c102d10bf0ad6ed761ac6 (diff)
parent1df1a6392477ad211b2a66c6eccbe9d5c6316c7e (diff)
downloadmariadb-git-f347b3e0e6592329b1447fa460aca0a4b1f680b1.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'storage/innobase/include/rem0rec.h')
-rw-r--r--storage/innobase/include/rem0rec.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h
index 797e945acbd..23c25f76362 100644
--- a/storage/innobase/include/rem0rec.h
+++ b/storage/innobase/include/rem0rec.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -678,19 +678,17 @@ rec_offs_make_nth_extern(
rec_offs* offsets,
const ulint n);
+MY_ATTRIBUTE((nonnull))
/** Determine the number of allocated elements for an array of offsets.
@param[in] offsets offsets after rec_offs_set_n_alloc()
@return number of elements */
-inline
-ulint
-rec_offs_get_n_alloc(const rec_offs* offsets)
+inline ulint rec_offs_get_n_alloc(const rec_offs *offsets)
{
- ulint n_alloc;
- ut_ad(offsets);
- n_alloc = offsets[0];
- ut_ad(n_alloc > REC_OFFS_HEADER_SIZE);
- UNIV_MEM_ASSERT_W(offsets, n_alloc * sizeof *offsets);
- return(n_alloc);
+ ut_ad(offsets);
+ ulint n_alloc= offsets[0];
+ ut_ad(n_alloc > REC_OFFS_HEADER_SIZE);
+ MEM_CHECK_ADDRESSABLE(offsets, n_alloc * sizeof *offsets);
+ return n_alloc;
}
/** Determine the number of fields for which offsets have been initialized.