summaryrefslogtreecommitdiff
path: root/storage/innobase/include/page0page.ic
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-01-20 16:48:56 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-01-20 16:48:56 +0200
commitded128aa9b3d40775e626a08a744a93d9ba71b01 (patch)
tree2abae3ef8fd5438fc99d269b47d645faec3cb8e8 /storage/innobase/include/page0page.ic
parent64952203af161c6e72744b6a2fb8e0f5274ea4d6 (diff)
parent259185764ba949bbe0cfa6bbef4673f61155cb90 (diff)
downloadmariadb-git-ded128aa9b3d40775e626a08a744a93d9ba71b01.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'storage/innobase/include/page0page.ic')
-rw-r--r--storage/innobase/include/page0page.ic24
1 files changed, 22 insertions, 2 deletions
diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.ic
index 992ad50a93b..5b26fe47412 100644
--- a/storage/innobase/include/page0page.ic
+++ b/storage/innobase/include/page0page.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, 2019, MariaDB Corporation.
+Copyright (c) 1994, 2019, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2016, 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
@@ -323,6 +323,26 @@ page_rec_is_last(
}
/************************************************************//**
+true if distance between the records (measured in number of times we have to
+move to the next record) is at most the specified value */
+UNIV_INLINE
+bool
+page_rec_distance_is_at_most(
+/*=========================*/
+ const rec_t* left_rec,
+ const rec_t* right_rec,
+ ulint val)
+{
+ for (ulint i = 0; i <= val; i++) {
+ if (left_rec == right_rec) {
+ return (true);
+ }
+ left_rec = page_rec_get_next_const(left_rec);
+ }
+ return (false);
+}
+
+/************************************************************//**
true if the record is the second last user record on a page.
@return true if the second last user record */
UNIV_INLINE