From 2b5a269cb49f56b9c83f3feb4dc9d5a1c5c6d9d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 13 Dec 2019 15:58:30 +0200 Subject: MDEV-21174: Clean up record insertion page_cur_insert_rec_low(): Take page_cur_t* as a parameter, and do not tolerate mtr=NULL. page_cur_insert_rec_zip(): Do not tolerate mtr=NULL. --- storage/innobase/include/page0cur.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'storage/innobase/include/page0cur.h') diff --git a/storage/innobase/include/page0cur.h b/storage/innobase/include/page0cur.h index 4003b3f9d5c..f16311bf0dd 100644 --- a/storage/innobase/include/page0cur.h +++ b/storage/innobase/include/page0cur.h @@ -181,13 +181,12 @@ space available, NULL otherwise. The cursor stays at the same position. rec_t* page_cur_insert_rec_low( /*====================*/ - rec_t* current_rec,/*!< in: pointer to current record after - which the new record is inserted */ + const page_cur_t*cur, /*!< in: page cursor */ dict_index_t* index, /*!< in: record descriptor */ - const rec_t* rec, /*!< in: pointer to a physical record */ + const rec_t* rec, /*!< in: record to insert after cur */ ulint* offsets,/*!< in/out: rec_get_offsets(rec, index) */ - mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */ - MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result)); + mtr_t* mtr) /*!< in/out: mini-transaction */ + MY_ATTRIBUTE((nonnull, warn_unused_result)); /***********************************************************//** Inserts a record next to page cursor on a compressed and uncompressed @@ -208,8 +207,8 @@ page_cur_insert_rec_zip( dict_index_t* index, /*!< in: record descriptor */ const rec_t* rec, /*!< in: pointer to a physical record */ ulint* offsets,/*!< in/out: rec_get_offsets(rec, index) */ - mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */ - MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result)); + mtr_t* mtr) /*!< in/out: mini-transaction */ + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*************************************************************//** Copies records from page to a newly created page, from a given record onward, including that record. Infimum and supremum records are not copied. -- cgit v1.2.1