diff options
author | Daniel Black <daniel@linux.ibm.com> | 2020-04-28 10:46:51 +1000 |
---|---|---|
committer | Robert Bindar <robert@mariadb.org> | 2020-04-29 12:02:47 +0300 |
commit | ba2061da52d9dba06dfd454efc1332f7d6cf476c (patch) | |
tree | 676a6d50d31d5f53263e5c2c158541f8b8986b03 /storage/innobase/include | |
parent | c238e9b96ab3660656ce440ed55f6380caa0f56b (diff) | |
download | mariadb-git-ba2061da52d9dba06dfd454efc1332f7d6cf476c.tar.gz |
MDEV-21595: innodb offset_t rename to rec_offs
thanks to:
perl -i -pe 's/\boffset_t\b/rec_offs/g' $(git grep -lw offset_t storage/innobase)
Diffstat (limited to 'storage/innobase/include')
29 files changed, 179 insertions, 179 deletions
diff --git a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h index c5ae633016a..5bc0b70714c 100644 --- a/storage/innobase/include/btr0btr.h +++ b/storage/innobase/include/btr0btr.h @@ -306,7 +306,7 @@ ulint btr_node_ptr_get_child_page_no( /*===========================*/ const rec_t* rec, /*!< in: node pointer record */ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((warn_unused_result)); /** Create the root node for a new index tree. @@ -393,7 +393,7 @@ btr_root_raise_and_insert( on the root page; when the function returns, the cursor is positioned on the predecessor of the inserted record */ - offset_t** offsets,/*!< out: offsets on inserted record */ + rec_offs** offsets,/*!< out: offsets on inserted record */ mem_heap_t** heap, /*!< in/out: pointer to memory heap that can be emptied, or NULL */ const dtuple_t* tuple, /*!< in: tuple to insert */ @@ -476,7 +476,7 @@ btr_page_split_and_insert( btr_cur_t* cursor, /*!< in: cursor at which to insert; when the function returns, the cursor is positioned on the predecessor of the inserted record */ - offset_t** offsets,/*!< out: offsets on inserted record */ + rec_offs** offsets,/*!< out: offsets on inserted record */ mem_heap_t** heap, /*!< in/out: pointer to memory heap that can be emptied, or NULL */ const dtuple_t* tuple, /*!< in: tuple to insert */ diff --git a/storage/innobase/include/btr0btr.ic b/storage/innobase/include/btr0btr.ic index e5d0e805bd8..878e414a039 100644 --- a/storage/innobase/include/btr0btr.ic +++ b/storage/innobase/include/btr0btr.ic @@ -218,7 +218,7 @@ ulint btr_node_ptr_get_child_page_no( /*===========================*/ const rec_t* rec, /*!< in: node pointer record */ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { const byte* field; ulint len; diff --git a/storage/innobase/include/btr0bulk.h b/storage/innobase/include/btr0bulk.h index 3dbc85cad6d..4c21d929848 100644 --- a/storage/innobase/include/btr0bulk.h +++ b/storage/innobase/include/btr0bulk.h @@ -104,7 +104,7 @@ public: /** Insert a record in the page. @param[in] rec record @param[in] offsets record offsets */ - void insert(const rec_t* rec, offset_t* offsets); + void insert(const rec_t* rec, rec_offs* offsets); /** Mark end of insertion to the page. Scan all records to set page dirs, and set page header members. */ @@ -128,7 +128,7 @@ public: @param[in] big_rec external recrod @param[in] offsets record offsets @return error code */ - dberr_t storeExt(const big_rec_t* big_rec, offset_t* offsets); + dberr_t storeExt(const big_rec_t* big_rec, rec_offs* offsets); /** Get node pointer @return node pointer */ diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h index 63338579064..19d0fb397be 100644 --- a/storage/innobase/include/btr0cur.h +++ b/storage/innobase/include/btr0cur.h @@ -243,7 +243,7 @@ btr_cur_optimistic_insert( specified */ btr_cur_t* cursor, /*!< in: cursor on page after which to insert; cursor stays valid */ - offset_t** offsets,/*!< out: offsets on *rec */ + rec_offs** offsets,/*!< out: offsets on *rec */ mem_heap_t** heap, /*!< in/out: pointer to memory heap */ dtuple_t* entry, /*!< in/out: entry to insert */ rec_t** rec, /*!< out: pointer to inserted record if @@ -279,7 +279,7 @@ btr_cur_pessimistic_insert( insertion will certainly succeed */ btr_cur_t* cursor, /*!< in: cursor after which to insert; cursor stays valid */ - offset_t** offsets,/*!< out: offsets on *rec */ + rec_offs** offsets,/*!< out: offsets on *rec */ mem_heap_t** heap, /*!< in/out: pointer to memory heap that can be emptied */ dtuple_t* entry, /*!< in/out: entry to insert */ @@ -313,7 +313,7 @@ btr_cur_update_alloc_zip_func( page_cur_t* cursor, /*!< in/out: B-tree page cursor */ dict_index_t* index, /*!< in: the index corresponding to cursor */ #ifdef UNIV_DEBUG - offset_t* offsets,/*!< in/out: offsets of the cursor record */ + rec_offs* offsets,/*!< in/out: offsets of the cursor record */ #endif /* UNIV_DEBUG */ ulint length, /*!< in: size needed */ bool create, /*!< in: true=delete-and-insert, @@ -340,7 +340,7 @@ btr_cur_update_in_place( btr_cur_t* cursor, /*!< in: cursor on the record to update; cursor stays valid and positioned on the same record */ - offset_t* offsets,/*!< in/out: offsets on cursor->page_cur.rec */ + rec_offs* offsets,/*!< in/out: offsets on cursor->page_cur.rec */ const upd_t* update, /*!< in: update vector */ ulint cmpl_info,/*!< in: compiler info on secondary index updates */ @@ -382,7 +382,7 @@ btr_cur_optimistic_update( btr_cur_t* cursor, /*!< in: cursor on the record to update; cursor stays valid and positioned on the same record */ - offset_t** offsets,/*!< out: offsets on cursor->page_cur.rec */ + rec_offs** offsets,/*!< out: offsets on cursor->page_cur.rec */ mem_heap_t** heap, /*!< in/out: pointer to NULL or memory heap */ const upd_t* update, /*!< in: update vector; this must also contain trx id and roll ptr fields */ @@ -409,7 +409,7 @@ btr_cur_pessimistic_update( btr_cur_t* cursor, /*!< in/out: cursor on the record to update; cursor may become invalid if *big_rec == NULL || !(flags & BTR_KEEP_POS_FLAG) */ - offset_t** offsets,/*!< out: offsets on cursor->page_cur.rec */ + rec_offs** offsets,/*!< out: offsets on cursor->page_cur.rec */ mem_heap_t** offsets_heap, /*!< in/out: pointer to memory heap that can be emptied */ @@ -441,7 +441,7 @@ btr_cur_del_mark_set_clust_rec( buf_block_t* block, /*!< in/out: buffer block of the record */ rec_t* rec, /*!< in/out: record */ dict_index_t* index, /*!< in: clustered index of the record */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec) */ que_thr_t* thr, /*!< in: query thread */ const dtuple_t* entry, /*!< in: dtuple for the deleting record */ mtr_t* mtr) /*!< in/out: mini-transaction */ @@ -608,7 +608,7 @@ btr_estimate_number_of_different_key_vals( ulint btr_rec_get_externally_stored_len( const rec_t* rec, - const offset_t* offsets); + const rec_offs* offsets); /*******************************************************************//** Marks non-updated off-page fields as disowned by this record. The ownership @@ -622,7 +622,7 @@ btr_cur_disown_inherited_fields( part will be updated, or NULL */ rec_t* rec, /*!< in/out: record in a clustered index */ dict_index_t* index, /*!< in: index of the page */ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ const upd_t* update, /*!< in: update vector */ mtr_t* mtr) /*!< in/out: mini-transaction */ MY_ATTRIBUTE((nonnull(2,3,4,5,6))); @@ -661,7 +661,7 @@ btr_store_big_rec_extern_fields( btr_pcur_t* pcur, /*!< in/out: a persistent cursor. if btr_mtr is restarted, then this can be repositioned. */ - offset_t* offsets, /*!< in/out: rec_get_offsets() on + rec_offs* offsets, /*!< in/out: rec_get_offsets() on pcur. the "external storage" flags in offsets will correctly correspond to rec when this function returns */ @@ -692,7 +692,7 @@ btr_free_externally_stored_field( byte* field_ref, /*!< in/out: field reference */ const rec_t* rec, /*!< in: record containing field_ref, for page_zip_write_blob_ptr(), or NULL */ - const offset_t* offsets, /*!< in: rec_get_offsets(rec, index), + const rec_offs* offsets, /*!< in: rec_get_offsets(rec, index), or NULL */ page_zip_des_t* page_zip, /*!< in: compressed page corresponding to rec, or NULL if rec == NULL */ @@ -749,7 +749,7 @@ protected by a lock or a page latch byte* btr_rec_copy_externally_stored_field( const rec_t* rec, - const offset_t* offsets, + const rec_offs* offsets, const page_size_t& page_size, ulint no, ulint* len, diff --git a/storage/innobase/include/gis0rtree.h b/storage/innobase/include/gis0rtree.h index 028014970f1..5e812d10451 100644 --- a/storage/innobase/include/gis0rtree.h +++ b/storage/innobase/include/gis0rtree.h @@ -91,7 +91,7 @@ rtr_page_split_and_insert( btr_cur_t* cursor, /*!< in/out: cursor at which to insert; when the function returns, the cursor is positioned on the predecessor of the inserted record */ - offset_t** offsets,/*!< out: offsets on inserted record */ + rec_offs** offsets,/*!< out: offsets on inserted record */ mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */ const dtuple_t* tuple, /*!< in: tuple to insert */ ulint n_ext, /*!< in: number of externally stored columns */ @@ -153,7 +153,7 @@ rtr_rec_cal_increase( dtuple in some of the common fields, or which has an equal number or more fields than dtuple */ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ double* area); /*!< out: increased area */ /****************************************************************//** @@ -261,7 +261,7 @@ void rtr_get_mbr_from_rec( /*=================*/ const rec_t* rec, /*!< in: data tuple */ - const offset_t* offsets,/*!< in: offsets array */ + const rec_offs* offsets,/*!< in: offsets array */ rtr_mbr_t* mbr); /*!< out MBR */ /****************************************************************//** @@ -293,10 +293,10 @@ rtr_page_get_father( Returns the father block to a page. It is assumed that mtr holds an X or SX latch on the tree. @return rec_get_offsets() of the node pointer record */ -offset_t* +rec_offs* rtr_page_get_father_block( /*======================*/ - offset_t* offsets,/*!< in: work area for the return value */ + rec_offs* offsets,/*!< in: work area for the return value */ mem_heap_t* heap, /*!< in: memory heap to use */ dict_index_t* index, /*!< in: b-tree index */ buf_block_t* block, /*!< in: child page in the index */ @@ -403,8 +403,8 @@ rtr_merge_and_update_mbr( /*=====================*/ btr_cur_t* cursor, /*!< in/out: cursor */ btr_cur_t* cursor2, /*!< in: the other cursor */ - offset_t* offsets, /*!< in: rec offsets */ - offset_t* offsets2, /*!< in: rec offsets */ + rec_offs* offsets, /*!< in: rec offsets */ + rec_offs* offsets2, /*!< in: rec offsets */ page_t* child_page, /*!< in: the child page. */ buf_block_t* merge_block, /*!< in: page to merge */ buf_block_t* block, /*!< in: page be merged */ @@ -429,8 +429,8 @@ rtr_merge_mbr_changed( /*==================*/ btr_cur_t* cursor, /*!< in: cursor */ btr_cur_t* cursor2, /*!< in: the other cursor */ - offset_t* offsets, /*!< in: rec offsets */ - offset_t* offsets2, /*!< in: rec offsets */ + rec_offs* offsets, /*!< in: rec offsets */ + rec_offs* offsets2, /*!< in: rec offsets */ rtr_mbr_t* new_mbr, /*!< out: MBR to update */ buf_block_t* merge_block, /*!< in: page to merge */ buf_block_t* block, /*!< in: page be merged */ @@ -444,7 +444,7 @@ bool rtr_update_mbr_field( /*=================*/ btr_cur_t* cursor, /*!< in: cursor pointed to rec.*/ - offset_t* offsets, /*!< in: offsets on rec. */ + rec_offs* offsets, /*!< in: offsets on rec. */ btr_cur_t* cursor2, /*!< in/out: cursor pointed to rec that should be deleted. this cursor is for btr_compress to diff --git a/storage/innobase/include/gis0rtree.ic b/storage/innobase/include/gis0rtree.ic index 525acb7ecf0..0d346051f00 100644 --- a/storage/innobase/include/gis0rtree.ic +++ b/storage/innobase/include/gis0rtree.ic @@ -40,7 +40,7 @@ rtr_page_cal_mbr( rec_t* rec; byte* field; ulint len; - offset_t* offsets = NULL; + rec_offs* offsets = NULL; double bmin, bmax; double* amin; double* amax; diff --git a/storage/innobase/include/handler0alter.h b/storage/innobase/include/handler0alter.h index 2fdcedc5bb6..35a04163f43 100644 --- a/storage/innobase/include/handler0alter.h +++ b/storage/innobase/include/handler0alter.h @@ -32,7 +32,7 @@ innobase_rec_to_mysql( struct TABLE* table, /*!< in/out: MySQL table */ const rec_t* rec, /*!< in: record */ const dict_index_t* index, /*!< in: index */ - const offset_t* offsets)/*!< in: rec_get_offsets( + const rec_offs* offsets)/*!< in: rec_get_offsets( rec, index, ...) */ MY_ATTRIBUTE((nonnull)); diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h index 6b30bc5ae1b..2ff8d74a024 100644 --- a/storage/innobase/include/lock0lock.h +++ b/storage/innobase/include/lock0lock.h @@ -317,7 +317,7 @@ lock_clust_rec_modify_check_and_lock( const rec_t* rec, /*!< in: record which should be modified */ dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */ que_thr_t* thr) /*!< in: query thread */ MY_ATTRIBUTE((warn_unused_result)); /*********************************************************************//** @@ -355,7 +355,7 @@ lock_sec_rec_read_check_and_lock( be read or passed over by a read cursor */ dict_index_t* index, /*!< in: secondary index */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */ lock_mode mode, /*!< in: mode of the lock which the read cursor should set on records: LOCK_S or LOCK_X; the @@ -383,7 +383,7 @@ lock_clust_rec_read_check_and_lock( be read or passed over by a read cursor */ dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */ lock_mode mode, /*!< in: mode of the lock which the read cursor should set on records: LOCK_S or LOCK_X; the @@ -432,7 +432,7 @@ lock_clust_rec_cons_read_sees( const rec_t* rec, /*!< in: user record which should be read or passed over by a read cursor */ dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */ ReadView* view); /*!< in: consistent read view */ /*********************************************************************//** Checks that a non-clustered index record is seen in a consistent read. @@ -577,7 +577,7 @@ lock_report_trx_id_insanity( trx_id_t trx_id, /*!< in: trx id */ const rec_t* rec, /*!< in: user record */ dict_index_t* index, /*!< in: index */ - const offset_t* offsets, /*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets, /*!< in: rec_get_offsets(rec, index) */ trx_id_t max_trx_id); /*!< in: trx_sys_get_max_trx_id() */ /*********************************************************************//** Prints info of locks for all transactions. @@ -803,7 +803,7 @@ lock_check_trx_id_sanity( trx_id_t trx_id, /*!< in: trx id */ const rec_t* rec, /*!< in: user record */ dict_index_t* index, /*!< in: index */ - const offset_t* offsets) /*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets) /*!< in: rec_get_offsets(rec, index) */ MY_ATTRIBUTE((warn_unused_result)); /*******************************************************************//** Check if the transaction holds any locks on the sys tables diff --git a/storage/innobase/include/lock0priv.h b/storage/innobase/include/lock0priv.h index 5e00e1bb6f1..1a950ac1cfa 100644 --- a/storage/innobase/include/lock0priv.h +++ b/storage/innobase/include/lock0priv.h @@ -469,7 +469,7 @@ lock_clust_rec_some_has_impl( /*=========================*/ const rec_t* rec, /*!< in: user record */ const dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets)/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets)/*!< in: rec_get_offsets(rec, index) */ MY_ATTRIBUTE((warn_unused_result)); /*********************************************************************//** diff --git a/storage/innobase/include/lock0priv.ic b/storage/innobase/include/lock0priv.ic index 7062e3f7082..8bb145e41fc 100644 --- a/storage/innobase/include/lock0priv.ic +++ b/storage/innobase/include/lock0priv.ic @@ -59,7 +59,7 @@ lock_clust_rec_some_has_impl( /*=========================*/ const rec_t* rec, /*!< in: user record */ const dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets)/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets)/*!< in: rec_get_offsets(rec, index) */ { ut_ad(dict_index_is_clust(index)); ut_ad(page_rec_is_user_rec(rec)); diff --git a/storage/innobase/include/page0cur.h b/storage/innobase/include/page0cur.h index d91f1bd7ba7..817902b6404 100644 --- a/storage/innobase/include/page0cur.h +++ b/storage/innobase/include/page0cur.h @@ -152,7 +152,7 @@ page_cur_tuple_insert( page_cur_t* cursor, /*!< in/out: a page cursor */ const dtuple_t* tuple, /*!< in: pointer to a data tuple */ dict_index_t* index, /*!< in: record descriptor */ - offset_t** offsets,/*!< out: offsets on *rec */ + rec_offs** offsets,/*!< out: offsets on *rec */ mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */ ulint n_ext, /*!< in: number of externally stored columns */ mtr_t* mtr, /*!< in: mini-transaction handle, or NULL */ @@ -179,7 +179,7 @@ page_cur_rec_insert( page_cur_t* cursor, /*!< in/out: a page cursor */ const rec_t* rec, /*!< in: record to insert */ dict_index_t* index, /*!< in: record descriptor */ - offset_t* offsets,/*!< in/out: rec_get_offsets(rec, index) */ + rec_offs* offsets,/*!< in/out: rec_get_offsets(rec, index) */ mtr_t* mtr); /*!< in: mini-transaction handle, or NULL */ /***********************************************************//** Inserts a record next to page cursor on an uncompressed page. @@ -193,7 +193,7 @@ page_cur_insert_rec_low( which the new record is inserted */ dict_index_t* index, /*!< in: record descriptor */ const rec_t* rec, /*!< in: pointer to a physical record */ - offset_t* offsets,/*!< in/out: rec_get_offsets(rec, index) */ + rec_offs* 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)); @@ -215,7 +215,7 @@ page_cur_insert_rec_zip( page_cur_t* cursor, /*!< in/out: page cursor */ dict_index_t* index, /*!< in: record descriptor */ const rec_t* rec, /*!< in: pointer to a physical record */ - offset_t* offsets,/*!< in/out: rec_get_offsets(rec, index) */ + rec_offs* 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)); /*************************************************************//** @@ -241,7 +241,7 @@ page_cur_delete_rec( /*================*/ page_cur_t* cursor, /*!< in/out: a page cursor */ const dict_index_t* index, /*!< in: record descriptor */ - const offset_t* offsets,/*!< in: rec_get_offsets( + const rec_offs* offsets,/*!< in: rec_get_offsets( cursor->rec, index) */ mtr_t* mtr); /*!< in: mini-transaction handle */ @@ -389,14 +389,14 @@ page_delete_rec( page_cur_t* pcur, /*!< in/out: page cursor on record to delete */ page_zip_des_t* page_zip,/*!< in: compressed page descriptor */ - const offset_t* offsets);/*!< in: offsets for record */ + const rec_offs* offsets);/*!< in: offsets for record */ /** Index page cursor */ struct page_cur_t{ const dict_index_t* index; rec_t* rec; /*!< pointer to a record on page */ - offset_t* offsets; + rec_offs* offsets; buf_block_t* block; /*!< pointer to the block containing rec */ }; diff --git a/storage/innobase/include/page0cur.ic b/storage/innobase/include/page0cur.ic index 982bda83c32..e57d3f9dee1 100644 --- a/storage/innobase/include/page0cur.ic +++ b/storage/innobase/include/page0cur.ic @@ -259,7 +259,7 @@ page_cur_tuple_insert( page_cur_t* cursor, /*!< in/out: a page cursor */ const dtuple_t* tuple, /*!< in: pointer to a data tuple */ dict_index_t* index, /*!< in: record descriptor */ - offset_t** offsets,/*!< out: offsets on *rec */ + rec_offs** offsets,/*!< out: offsets on *rec */ mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */ ulint n_ext, /*!< in: number of externally stored columns */ mtr_t* mtr, /*!< in: mini-transaction handle, or NULL */ @@ -315,7 +315,7 @@ page_cur_rec_insert( page_cur_t* cursor, /*!< in/out: a page cursor */ const rec_t* rec, /*!< in: record to insert */ dict_index_t* index, /*!< in: record descriptor */ - offset_t* offsets,/*!< in/out: rec_get_offsets(rec, index) */ + rec_offs* offsets,/*!< in/out: rec_get_offsets(rec, index) */ mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */ { if (buf_block_get_page_zip(cursor->block)) { diff --git a/storage/innobase/include/page0page.h b/storage/innobase/include/page0page.h index 54edf034ac6..6befcc33a9e 100644 --- a/storage/innobase/include/page0page.h +++ b/storage/innobase/include/page0page.h @@ -936,7 +936,7 @@ page_mem_free( rec_t* rec, /*!< in: pointer to the (origin of) record */ const dict_index_t* index, /*!< in: index of rec */ - const offset_t* offsets);/*!< in: array returned by + const rec_offs* offsets);/*!< in: array returned by rec_get_offsets() */ /**********************************************************//** Create an uncompressed B-tree index page. @@ -1157,7 +1157,7 @@ void page_rec_print( /*===========*/ const rec_t* rec, /*!< in: physical record */ - const offset_t* offsets);/*!< in: record descriptor */ + const rec_offs* offsets);/*!< in: record descriptor */ # ifdef UNIV_BTR_PRINT /***************************************************************//** This is used to print the contents of the directory for @@ -1204,7 +1204,7 @@ ibool page_rec_validate( /*==============*/ const rec_t* rec, /*!< in: physical record */ - const offset_t* offsets);/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets);/*!< in: array returned by rec_get_offsets() */ #ifdef UNIV_DEBUG /***************************************************************//** Checks that the first directory slot points to the infimum record and diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.ic index 75bfa56e2a6..4efb92f7182 100644 --- a/storage/innobase/include/page0page.ic +++ b/storage/innobase/include/page0page.ic @@ -1025,7 +1025,7 @@ page_mem_free( rec_t* rec, /*!< in: pointer to the (origin of) record */ const dict_index_t* index, /*!< in: index of rec */ - const offset_t* offsets) /*!< in: array returned by + const rec_offs* offsets) /*!< in: array returned by rec_get_offsets() */ { rec_t* free; diff --git a/storage/innobase/include/page0types.h b/storage/innobase/include/page0types.h index 4debd639fa4..0fcaebd0e43 100644 --- a/storage/innobase/include/page0types.h +++ b/storage/innobase/include/page0types.h @@ -185,7 +185,7 @@ page_zip_dir_delete( page_zip_des_t* page_zip,/*!< in/out: compressed page */ byte* rec, /*!< in: deleted record */ dict_index_t* index, /*!< in: index of rec */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec) */ const byte* free) /*!< in: previous start of the free list */ MY_ATTRIBUTE((nonnull(1,2,3,4))); diff --git a/storage/innobase/include/page0zip.h b/storage/innobase/include/page0zip.h index 01b51ea2a0b..f411fd0eee9 100644 --- a/storage/innobase/include/page0zip.h +++ b/storage/innobase/include/page0zip.h @@ -288,7 +288,7 @@ page_zip_write_rec( page_zip_des_t* page_zip,/*!< in/out: compressed page */ const byte* rec, /*!< in: record being written */ dict_index_t* index, /*!< in: the index the record belongs to */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */ ulint create) /*!< in: nonzero=insert, zero=update */ MY_ATTRIBUTE((nonnull)); @@ -313,7 +313,7 @@ page_zip_write_blob_ptr( const byte* rec, /*!< in/out: record whose data is being written */ dict_index_t* index, /*!< in: index of the page */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */ ulint n, /*!< in: column index */ mtr_t* mtr); /*!< in: mini-transaction handle, or NULL if no logging is needed */ @@ -347,7 +347,7 @@ page_zip_write_trx_id_and_roll_ptr( /*===============================*/ page_zip_des_t* page_zip,/*!< in/out: compressed page */ byte* rec, /*!< in/out: record */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */ ulint trx_id_col,/*!< in: column number of TRX_ID in rec */ trx_id_t trx_id, /*!< in: transaction identifier */ roll_ptr_t roll_ptr)/*!< in: roll_ptr */ @@ -395,7 +395,7 @@ page_zip_dir_delete( page_zip_des_t* page_zip, /*!< in/out: compressed page */ byte* rec, /*!< in: deleted record */ const dict_index_t* index, /*!< in: index of rec */ - const offset_t* offsets, /*!< in: rec_get_offsets(rec) */ + const rec_offs* offsets, /*!< in: rec_get_offsets(rec) */ const byte* free) /*!< in: previous start of the free list */ MY_ATTRIBUTE((nonnull(1,2,3,4))); diff --git a/storage/innobase/include/rem0cmp.h b/storage/innobase/include/rem0cmp.h index af1b145b0d9..65504d14416 100644 --- a/storage/innobase/include/rem0cmp.h +++ b/storage/innobase/include/rem0cmp.h @@ -89,7 +89,7 @@ cmp_dtuple_rec_with_gis( /*====================*/ const dtuple_t* dtuple, const rec_t* rec, - const offset_t* offsets, + const rec_offs* offsets, page_cur_mode_t mode) MY_ATTRIBUTE((nonnull)); @@ -105,7 +105,7 @@ int cmp_dtuple_rec_with_gis_internal( const dtuple_t* dtuple, const rec_t* rec, - const offset_t* offsets); + const rec_offs* offsets); /** Compare a data tuple to a physical record. @param[in] dtuple data tuple @@ -121,7 +121,7 @@ int cmp_dtuple_rec_with_match_low( const dtuple_t* dtuple, const rec_t* rec, - const offset_t* offsets, + const rec_offs* offsets, ulint n_cmp, ulint* matched_fields) MY_ATTRIBUTE((nonnull)); @@ -145,7 +145,7 @@ cmp_dtuple_rec_with_match_bytes( const dtuple_t* dtuple, const rec_t* rec, const dict_index_t* index, - const offset_t* offsets, + const rec_offs* offsets, ulint* matched_fields, ulint* matched_bytes) MY_ATTRIBUTE((warn_unused_result)); @@ -162,7 +162,7 @@ int cmp_dtuple_rec( const dtuple_t* dtuple, const rec_t* rec, - const offset_t* offsets); + const rec_offs* offsets); /**************************************************************//** Checks if a dtuple is a prefix of a record. The last field in dtuple is allowed to be a prefix of the corresponding field in the record. @@ -172,7 +172,7 @@ cmp_dtuple_is_prefix_of_rec( /*========================*/ const dtuple_t* dtuple, /*!< in: data tuple */ const rec_t* rec, /*!< in: physical record */ - const offset_t* offsets);/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets);/*!< in: array returned by rec_get_offsets() */ /** Compare two physical records that contain the same number of columns, none of which are stored externally. @retval positive if rec1 (including non-ordering columns) is greater than rec2 @@ -183,8 +183,8 @@ cmp_rec_rec_simple( /*===============*/ const rec_t* rec1, /*!< in: physical record */ const rec_t* rec2, /*!< in: physical record */ - const offset_t* offsets1,/*!< in: rec_get_offsets(rec1, ...) */ - const offset_t* offsets2,/*!< in: rec_get_offsets(rec2, ...) */ + const rec_offs* offsets1,/*!< in: rec_get_offsets(rec1, ...) */ + const rec_offs* offsets2,/*!< in: rec_get_offsets(rec2, ...) */ const dict_index_t* index, /*!< in: data dictionary index */ struct TABLE* table) /*!< in: MySQL table, for reporting duplicate key value if applicable, @@ -211,8 +211,8 @@ int cmp_rec_rec( const rec_t* rec1, const rec_t* rec2, - const offset_t* offsets1, - const offset_t* offsets2, + const rec_offs* offsets1, + const rec_offs* offsets2, const dict_index_t* index, bool nulls_unequal = false, ulint* matched_fields = NULL) diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h index 72ee96b2887..728944d4373 100644 --- a/storage/innobase/include/rem0rec.h +++ b/storage/innobase/include/rem0rec.h @@ -73,23 +73,23 @@ The status is stored in the low-order bits. */ #ifndef UNIV_INNOCHECKSUM /** SQL null flag in a 1-byte offset of ROW_FORMAT=REDUNDANT records */ -static const offset_t REC_1BYTE_SQL_NULL_MASK= 0x80; +static const rec_offs REC_1BYTE_SQL_NULL_MASK= 0x80; /** SQL null flag in a 2-byte offset of ROW_FORMAT=REDUNDANT records */ -static const offset_t REC_2BYTE_SQL_NULL_MASK= 0x8000; +static const rec_offs REC_2BYTE_SQL_NULL_MASK= 0x8000; /** In a 2-byte offset of ROW_FORMAT=REDUNDANT records, the second most significant bit denotes that the tail of a field is stored off-page. */ -static const offset_t REC_2BYTE_EXTERN_MASK= 0x4000; +static const rec_offs REC_2BYTE_EXTERN_MASK= 0x4000; static const size_t RECORD_OFFSET= 2; static const size_t INDEX_OFFSET= - RECORD_OFFSET + sizeof(rec_t *) / sizeof(offset_t); + RECORD_OFFSET + sizeof(rec_t *) / sizeof(rec_offs); /* Length of the rec_get_offsets() header */ static const size_t REC_OFFS_HEADER_SIZE= #ifdef UNIV_DEBUG - sizeof(rec_t *) / sizeof(offset_t) + - sizeof(dict_index_t *) / sizeof(offset_t) + + sizeof(rec_t *) / sizeof(rec_offs) + + sizeof(dict_index_t *) / sizeof(rec_offs) + #endif /* UNIV_DEBUG */ 2; @@ -115,27 +115,27 @@ enum field_type_t }; /** without 2 upper bits */ -static const offset_t DATA_MASK= 0x3fff; +static const rec_offs DATA_MASK= 0x3fff; /** 2 upper bits */ -static const offset_t TYPE_MASK= ~DATA_MASK; -inline field_type_t get_type(offset_t n) +static const rec_offs TYPE_MASK= ~DATA_MASK; +inline field_type_t get_type(rec_offs n) { return static_cast<field_type_t>(n & TYPE_MASK); } -inline void set_type(offset_t &n, field_type_t type) +inline void set_type(rec_offs &n, field_type_t type) { - n= (n & DATA_MASK) | static_cast<offset_t>(type); + n= (n & DATA_MASK) | static_cast<rec_offs>(type); } -inline offset_t get_value(offset_t n) { return n & DATA_MASK; } -inline offset_t combine(offset_t value, field_type_t type) +inline rec_offs get_value(rec_offs n) { return n & DATA_MASK; } +inline rec_offs combine(rec_offs value, field_type_t type) { - return get_value(value) | static_cast<offset_t>(type); + return get_value(value) | static_cast<rec_offs>(type); } /** Compact flag ORed to the extra size returned by rec_offs_base()[0] */ -static const offset_t REC_OFFS_COMPACT= 1 << 15; +static const rec_offs REC_OFFS_COMPACT= 1 << 15; /** External flag in offsets returned by rec_offs_base()[0] */ -static const offset_t REC_OFFS_EXTERNAL= 1 << 14; +static const rec_offs REC_OFFS_EXTERNAL= 1 << 14; /******************************************************//** The following function is used to get the pointer of the next chained record @@ -455,7 +455,7 @@ value. @return offset of the start of the field, SQL null flag and extern storage flag ORed */ UNIV_INLINE -offset_t +rec_offs rec_2_get_field_end_info( /*=====================*/ const rec_t* rec, /*!< in: record */ @@ -496,11 +496,11 @@ rec_get_n_extern_new( (ULINT_UNDEFINED to compute all offsets) @param[in,out] heap memory heap @return the new offsets */ -offset_t* +rec_offs* rec_get_offsets_func( const rec_t* rec, const dict_index_t* index, - offset_t* offsets, + rec_offs* offsets, #ifdef UNIV_DEBUG bool leaf, #endif /* UNIV_DEBUG */ @@ -537,7 +537,7 @@ rec_get_offsets_reverse( const dict_index_t* index, /*!< in: record descriptor */ ulint node_ptr,/*!< in: nonzero=node pointer, 0=leaf node */ - offset_t* offsets)/*!< in/out: array consisting of + rec_offs* offsets)/*!< in/out: array consisting of offsets[0] allocated elements */ MY_ATTRIBUTE((nonnull)); #ifdef UNIV_DEBUG @@ -550,7 +550,7 @@ rec_offs_validate( /*==============*/ const rec_t* rec, /*!< in: record or NULL */ const dict_index_t* index, /*!< in: record descriptor or NULL */ - const offset_t* offsets)/*!< in: array returned by + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((nonnull(3), warn_unused_result)); /************************************************************//** @@ -562,7 +562,7 @@ rec_offs_make_valid( /*================*/ const rec_t* rec, /*!< in: record */ const dict_index_t* index, /*!< in: record descriptor */ - offset_t* offsets)/*!< in: array returned by + rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((nonnull)); #else @@ -600,10 +600,10 @@ The following function is used to get an offset to the nth data field in a record. @return offset from the origin of rec */ UNIV_INLINE -offset_t +rec_offs rec_get_nth_field_offs( /*===================*/ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n, /*!< in: index of the field */ ulint* len) /*!< out: length of the field; UNIV_SQL_NULL if SQL null */ @@ -618,7 +618,7 @@ UNIV_INLINE ulint rec_offs_comp( /*==========*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((warn_unused_result)); /******************************************************//** Determine if the offsets are for a record containing @@ -628,7 +628,7 @@ UNIV_INLINE ulint rec_offs_any_extern( /*================*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((warn_unused_result)); /******************************************************//** Determine if the offsets are for a record containing null BLOB pointers. @@ -638,7 +638,7 @@ const byte* rec_offs_any_null_extern( /*=====================*/ const rec_t* rec, /*!< in: record */ - const offset_t* offsets) /*!< in: rec_get_offsets(rec) */ + const rec_offs* offsets) /*!< in: rec_get_offsets(rec) */ MY_ATTRIBUTE((warn_unused_result)); /******************************************************//** Returns nonzero if the extern bit is set in nth field of rec. @@ -647,7 +647,7 @@ UNIV_INLINE ulint rec_offs_nth_extern( /*================*/ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n) /*!< in: nth field */ MY_ATTRIBUTE((warn_unused_result)); @@ -656,7 +656,7 @@ rec_offs_nth_extern( @param[in] n nth field */ void rec_offs_make_nth_extern( - offset_t* offsets, + rec_offs* offsets, const ulint n); /******************************************************//** Returns nonzero if the SQL NULL bit is set in nth field of rec. @@ -665,7 +665,7 @@ UNIV_INLINE ulint rec_offs_nth_sql_null( /*==================*/ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n) /*!< in: nth field */ MY_ATTRIBUTE((warn_unused_result)); /******************************************************//** @@ -675,7 +675,7 @@ UNIV_INLINE ulint rec_offs_nth_size( /*==============*/ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n) /*!< in: nth field */ MY_ATTRIBUTE((warn_unused_result)); @@ -686,7 +686,7 @@ UNIV_INLINE ulint rec_offs_n_extern( /*==============*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((warn_unused_result)); /***********************************************************//** This is used to modify the value of an already existing field in a record. @@ -699,7 +699,7 @@ void rec_set_nth_field( /*==============*/ rec_t* rec, /*!< in: record */ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n, /*!< in: index number of the field */ const void* data, /*!< in: pointer to the data if not SQL null */ ulint len) /*!< in: length of the data or UNIV_SQL_NULL. @@ -728,7 +728,7 @@ UNIV_INLINE ulint rec_offs_get_n_alloc( /*=================*/ - const offset_t* offsets)/*!< in: array for rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array for rec_get_offsets() */ MY_ATTRIBUTE((warn_unused_result)); /**********************************************************//** The following function sets the number of allocated elements @@ -737,7 +737,7 @@ UNIV_INLINE void rec_offs_set_n_alloc( /*=================*/ - offset_t*offsets, /*!< out: array for rec_get_offsets(), + rec_offs*offsets, /*!< out: array for rec_get_offsets(), must be allocated */ ulint n_alloc) /*!< in: number of elements */ MY_ATTRIBUTE((nonnull)); @@ -750,7 +750,7 @@ UNIV_INLINE ulint rec_offs_n_fields( /*==============*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((warn_unused_result)); /**********************************************************//** The following function returns the data size of a physical @@ -762,7 +762,7 @@ UNIV_INLINE ulint rec_offs_data_size( /*===============*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((warn_unused_result)); /**********************************************************//** Returns the total size of record minus data size of record. @@ -773,7 +773,7 @@ UNIV_INLINE ulint rec_offs_extra_size( /*================*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((warn_unused_result)); /**********************************************************//** Returns the total size of a physical record. @@ -782,7 +782,7 @@ UNIV_INLINE ulint rec_offs_size( /*==========*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((warn_unused_result)); #ifdef UNIV_DEBUG /**********************************************************//** @@ -793,7 +793,7 @@ byte* rec_get_start( /*==========*/ const rec_t* rec, /*!< in: pointer to record */ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((warn_unused_result)); /**********************************************************//** Returns a pointer to the end of the record. @@ -803,7 +803,7 @@ byte* rec_get_end( /*========*/ const rec_t* rec, /*!< in: pointer to record */ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((warn_unused_result)); #else /* UNIV_DEBUG */ # define rec_get_start(rec, offsets) ((rec) - rec_offs_extra_size(offsets)) @@ -820,7 +820,7 @@ rec_t* rec_copy( void* buf, const rec_t* rec, - const offset_t* offsets); + const rec_offs* offsets); /** Determine the size of a data tuple prefix in a temporary file. @param[in] index clustered or secondary index @@ -844,7 +844,7 @@ rec_init_offsets_temp( /*==================*/ const rec_t* rec, /*!< in: temporary file record */ const dict_index_t* index, /*!< in: record descriptor */ - offset_t* offsets)/*!< in/out: array of offsets; + rec_offs* offsets)/*!< in/out: array of offsets; in: n=rec_offs_n_fields(offsets) */ MY_ATTRIBUTE((nonnull)); @@ -886,7 +886,7 @@ UNIV_INLINE ulint rec_fold( const rec_t* rec, - const offset_t* offsets, + const rec_offs* offsets, ulint n_fields, ulint n_bytes, index_id_t tree_id) @@ -987,7 +987,7 @@ ibool rec_validate( /*=========*/ const rec_t* rec, /*!< in: physical record */ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((nonnull)); /***************************************************************//** Prints an old-style physical record. */ @@ -1004,7 +1004,7 @@ rec_print_mbr_rec( /*==========*/ FILE* file, /*!< in: file where to print */ const rec_t* rec, /*!< in: physical record */ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((nonnull)); /***************************************************************//** Prints a physical record. */ @@ -1013,7 +1013,7 @@ rec_print_new( /*==========*/ FILE* file, /*!< in: file where to print */ const rec_t* rec, /*!< in: physical record */ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ MY_ATTRIBUTE((nonnull)); /***************************************************************//** Prints a physical record. */ @@ -1035,7 +1035,7 @@ rec_print( std::ostream& o, const rec_t* rec, ulint info, - const offset_t* offsets); + const rec_offs* offsets); /** Wrapper for pretty-printing a record */ struct rec_index_print @@ -1062,14 +1062,14 @@ operator<<(std::ostream& o, const rec_index_print& r); struct rec_offsets_print { /** Constructor */ - rec_offsets_print(const rec_t* rec, const offset_t* offsets) : + rec_offsets_print(const rec_t* rec, const rec_offs* offsets) : m_rec(rec), m_offsets(offsets) {} /** Record */ const rec_t* m_rec; /** Offsets to each field */ - const offset_t* m_offsets; + const rec_offs* m_offsets; }; /** Display a record. @@ -1086,7 +1086,7 @@ public: /** Construct a pretty-printed record. @param rec record with header @param offsets rec_get_offsets(rec, ...) */ - rec_printer(const rec_t* rec, const offset_t* offsets) + rec_printer(const rec_t* rec, const rec_offs* offsets) : std::ostringstream () { @@ -1099,7 +1099,7 @@ public: @param rec record, possibly lacking header @param info rec_get_info_bits(rec) @param offsets rec_get_offsets(rec, ...) */ - rec_printer(const rec_t* rec, ulint info, const offset_t* offsets) + rec_printer(const rec_t* rec, ulint info, const rec_offs* offsets) : std::ostringstream () { diff --git a/storage/innobase/include/rem0rec.ic b/storage/innobase/include/rem0rec.ic index eae1c52a2a5..2602b281e7d 100644 --- a/storage/innobase/include/rem0rec.ic +++ b/storage/innobase/include/rem0rec.ic @@ -883,7 +883,7 @@ value. @return offset of the start of the field, SQL null flag and extern storage flag ORed */ UNIV_INLINE -offset_t +rec_offs rec_2_get_field_end_info( /*=====================*/ const rec_t* rec, /*!< in: record */ @@ -922,7 +922,7 @@ UNIV_INLINE ulint rec_offs_get_n_alloc( /*=================*/ - const offset_t* offsets)/*!< in: array for rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array for rec_get_offsets() */ { ulint n_alloc; ut_ad(offsets); @@ -939,13 +939,13 @@ UNIV_INLINE void rec_offs_set_n_alloc( /*=================*/ - offset_t*offsets, /*!< out: array for rec_get_offsets(), + rec_offs*offsets, /*!< out: array for rec_get_offsets(), must be allocated */ ulint n_alloc) /*!< in: number of elements */ { ut_ad(n_alloc > REC_OFFS_HEADER_SIZE); UNIV_MEM_ALLOC(offsets, n_alloc * sizeof *offsets); - offsets[0] = static_cast<offset_t>(n_alloc); + offsets[0] = static_cast<rec_offs>(n_alloc); } /**********************************************************//** @@ -955,7 +955,7 @@ UNIV_INLINE ulint rec_offs_n_fields( /*==============*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { ulint n_fields; ut_ad(offsets); @@ -976,7 +976,7 @@ rec_offs_validate( /*==============*/ const rec_t* rec, /*!< in: record or NULL */ const dict_index_t* index, /*!< in: record descriptor or NULL */ - const offset_t* offsets)/*!< in: array returned by + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { ulint i = rec_offs_n_fields(offsets); @@ -1016,7 +1016,7 @@ rec_offs_validate( ut_a(!index->n_def || i <= max_n_fields); } while (i--) { - offset_t curr = get_value(rec_offs_base(offsets)[1 + i]); + rec_offs curr = get_value(rec_offs_base(offsets)[1 + i]); ut_a(curr <= last); last = curr; } @@ -1032,7 +1032,7 @@ rec_offs_make_valid( /*================*/ const rec_t* rec, /*!< in: record */ const dict_index_t* index, /*!< in: record descriptor */ - offset_t* offsets)/*!< in: array returned by + rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { ut_ad(rec); @@ -1049,18 +1049,18 @@ The following function is used to get an offset to the nth data field in a record. @return offset from the origin of rec */ UNIV_INLINE -offset_t +rec_offs rec_get_nth_field_offs( /*===================*/ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n, /*!< in: index of the field */ ulint* len) /*!< out: length of the field; UNIV_SQL_NULL if SQL null */ { ut_ad(n < rec_offs_n_fields(offsets)); - offset_t offs = n == 0 ? 0 : get_value(rec_offs_base(offsets)[n]); - offset_t next_offs = rec_offs_base(offsets)[1 + n]; + rec_offs offs = n == 0 ? 0 : get_value(rec_offs_base(offsets)[n]); + rec_offs next_offs = rec_offs_base(offsets)[1 + n]; if (get_type(next_offs) == SQL_NULL) { *len = UNIV_SQL_NULL; @@ -1080,7 +1080,7 @@ UNIV_INLINE ulint rec_offs_comp( /*==========*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { ut_ad(rec_offs_validate(NULL, NULL, offsets)); return(*rec_offs_base(offsets) & REC_OFFS_COMPACT); @@ -1094,7 +1094,7 @@ UNIV_INLINE ulint rec_offs_any_extern( /*================*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { ut_ad(rec_offs_validate(NULL, NULL, offsets)); return(*rec_offs_base(offsets) & REC_OFFS_EXTERNAL); @@ -1108,7 +1108,7 @@ const byte* rec_offs_any_null_extern( /*=====================*/ const rec_t* rec, /*!< in: record */ - const offset_t* offsets) /*!< in: rec_get_offsets(rec) */ + const rec_offs* offsets) /*!< in: rec_get_offsets(rec) */ { ulint i; ut_ad(rec_offs_validate(rec, NULL, offsets)); @@ -1143,7 +1143,7 @@ UNIV_INLINE ulint rec_offs_nth_extern( /*================*/ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n) /*!< in: nth field */ { ut_ad(rec_offs_validate(NULL, NULL, offsets)); @@ -1158,7 +1158,7 @@ UNIV_INLINE ulint rec_offs_nth_sql_null( /*==================*/ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n) /*!< in: nth field */ { ut_ad(rec_offs_validate(NULL, NULL, offsets)); @@ -1173,7 +1173,7 @@ UNIV_INLINE ulint rec_offs_nth_size( /*==============*/ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n) /*!< in: nth field */ { ut_ad(rec_offs_validate(NULL, NULL, offsets)); @@ -1192,7 +1192,7 @@ UNIV_INLINE ulint rec_offs_n_extern( /*==============*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { ulint n = 0; @@ -1390,7 +1390,7 @@ void rec_set_nth_field( /*==============*/ rec_t* rec, /*!< in: record */ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n, /*!< in: index number of the field */ const void* data, /*!< in: pointer to the data if not SQL null */ @@ -1445,7 +1445,7 @@ UNIV_INLINE void rec_offs_set_n_fields( /*==================*/ - offset_t* offsets, /*!< in/out: array returned by + rec_offs* offsets, /*!< in/out: array returned by rec_get_offsets() */ ulint n_fields) /*!< in: number of fields */ { @@ -1454,7 +1454,7 @@ rec_offs_set_n_fields( ut_ad(n_fields <= REC_MAX_N_FIELDS); ut_ad(n_fields + REC_OFFS_HEADER_SIZE <= rec_offs_get_n_alloc(offsets)); - offsets[1] = static_cast<offset_t>(n_fields); + offsets[1] = static_cast<rec_offs>(n_fields); } /**********************************************************//** @@ -1467,7 +1467,7 @@ UNIV_INLINE ulint rec_offs_data_size( /*===============*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { ulint size; @@ -1486,7 +1486,7 @@ UNIV_INLINE ulint rec_offs_extra_size( /*================*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { ulint size; ut_ad(rec_offs_validate(NULL, NULL, offsets)); @@ -1502,7 +1502,7 @@ UNIV_INLINE ulint rec_offs_size( /*==========*/ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { return(rec_offs_data_size(offsets) + rec_offs_extra_size(offsets)); } @@ -1516,7 +1516,7 @@ byte* rec_get_end( /*========*/ const rec_t* rec, /*!< in: pointer to record */ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { ut_ad(rec_offs_validate(rec, NULL, offsets)); return(const_cast<rec_t*>(rec + rec_offs_data_size(offsets))); @@ -1530,7 +1530,7 @@ byte* rec_get_start( /*==========*/ const rec_t* rec, /*!< in: pointer to record */ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { ut_ad(rec_offs_validate(rec, NULL, offsets)); return(const_cast<rec_t*>(rec - rec_offs_extra_size(offsets))); @@ -1547,7 +1547,7 @@ rec_t* rec_copy( void* buf, const rec_t* rec, - const offset_t* offsets) + const rec_offs* offsets) { ulint extra_len; ulint data_len; @@ -1683,7 +1683,7 @@ UNIV_INLINE ulint rec_fold( const rec_t* rec, - const offset_t* offsets, + const rec_offs* offsets, ulint n_fields, ulint n_bytes, index_id_t tree_id) diff --git a/storage/innobase/include/rem0types.h b/storage/innobase/include/rem0types.h index 4482517fc4e..9172385a802 100644 --- a/storage/innobase/include/rem0types.h +++ b/storage/innobase/include/rem0types.h @@ -31,7 +31,7 @@ Created 5/30/1994 Heikki Tuuri typedef byte rec_t; /** This type represents a field offset in a rec_t* */ -typedef unsigned short int offset_t; +typedef unsigned short int rec_offs; /* Maximum values for various fields (for non-blob tuples) */ #define REC_MAX_N_FIELDS (1024 - 1) diff --git a/storage/innobase/include/row0ftsort.h b/storage/innobase/include/row0ftsort.h index 73f815604d8..84368374430 100644 --- a/storage/innobase/include/row0ftsort.h +++ b/storage/innobase/include/row0ftsort.h @@ -248,7 +248,7 @@ row_merge_fts_sel_propagate( int* sel_tree, /*<! in: selection tree */ ulint level, /*<! in: selection tree level */ const mrec_t** mrec, /*<! in: sort record */ - offset_t** offsets, /*<! in: record offsets */ + rec_offs** offsets, /*<! in: record offsets */ dict_index_t* index); /*<! in: FTS index */ /********************************************************************//** Read sorted file containing index data tuples and insert these data diff --git a/storage/innobase/include/row0log.h b/storage/innobase/include/row0log.h index 6f8860a7f8c..383975c32d3 100644 --- a/storage/innobase/include/row0log.h +++ b/storage/innobase/include/row0log.h @@ -132,7 +132,7 @@ row_log_table_delete( page X-latched */ dict_index_t* index, /*!< in/out: clustered index, S-latched or X-latched */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec,index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec,index) */ const byte* sys) /*!< in: DB_TRX_ID,DB_ROLL_PTR that should be logged, or NULL to use those in rec */ ATTRIBUTE_COLD __attribute__((nonnull(1,2,3))); @@ -147,7 +147,7 @@ row_log_table_update( page X-latched */ dict_index_t* index, /*!< in/out: clustered index, S-latched or X-latched */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec,index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec,index) */ const dtuple_t* old_pk);/*!< in: row_log_table_get_pk() before the update */ @@ -163,7 +163,7 @@ row_log_table_get_pk( page X-latched */ dict_index_t* index, /*!< in/out: clustered index, S-latched or X-latched */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec,index), + const rec_offs* offsets,/*!< in: rec_get_offsets(rec,index), or NULL */ byte* sys, /*!< out: DB_TRX_ID,DB_ROLL_PTR for row_log_table_delete(), or NULL */ @@ -180,7 +180,7 @@ row_log_table_insert( page X-latched */ dict_index_t* index, /*!< in/out: clustered index, S-latched or X-latched */ - const offset_t* offsets);/*!< in: rec_get_offsets(rec,index) */ + const rec_offs* offsets);/*!< in: rec_get_offsets(rec,index) */ /******************************************************//** Notes that a BLOB is being freed during online ALTER TABLE. */ void diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h index 8e7ca5de046..0d48fbd2e8a 100644 --- a/storage/innobase/include/row0merge.h +++ b/storage/innobase/include/row0merge.h @@ -477,7 +477,7 @@ row_merge_read_rec( const mrec_t** mrec, /*!< out: pointer to merge record, or NULL on end of list (non-NULL on I/O error) */ - offset_t* offsets,/*!< out: offsets of mrec */ + rec_offs* offsets,/*!< out: offsets of mrec */ row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ ulint space) /*!< in: space id */ MY_ATTRIBUTE((warn_unused_result)); diff --git a/storage/innobase/include/row0row.h b/storage/innobase/include/row0row.h index b7030e91098..1c7e40ac690 100644 --- a/storage/innobase/include/row0row.h +++ b/storage/innobase/include/row0row.h @@ -44,7 +44,7 @@ ulint row_get_trx_id_offset( /*==================*/ const dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets)/*!< in: record offsets */ + const rec_offs* offsets)/*!< in: record offsets */ MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Reads the trx id field from a clustered index record. @@ -55,7 +55,7 @@ row_get_rec_trx_id( /*===============*/ const rec_t* rec, /*!< in: record */ const dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets)/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets)/*!< in: rec_get_offsets(rec, index) */ MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Reads the roll pointer field from a clustered index record. @@ -66,7 +66,7 @@ row_get_rec_roll_ptr( /*=================*/ const rec_t* rec, /*!< in: record */ const dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets)/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets)/*!< in: rec_get_offsets(rec, index) */ MY_ATTRIBUTE((nonnull, warn_unused_result)); /* Flags for row build type. */ @@ -138,7 +138,7 @@ row_build( this record must be at least s-latched and the latch held as long as the row dtuple is used! */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec,index) + const rec_offs* offsets,/*!< in: rec_get_offsets(rec,index) or NULL, in which case this function will invoke rec_get_offsets() */ const dict_table_t* col_table, @@ -189,7 +189,7 @@ row_build_w_add_vcol( ulint type, const dict_index_t* index, const rec_t* rec, - const offset_t* offsets, + const rec_offs* offsets, const dict_table_t* col_table, const dtuple_t* add_cols, const dict_add_v_col_t* add_v, @@ -206,7 +206,7 @@ row_rec_to_index_entry_low( /*=======================*/ const rec_t* rec, /*!< in: record in the index */ const dict_index_t* index, /*!< in: index */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */ mem_heap_t* heap) /*!< in: memory heap from which the memory needed is allocated */ MY_ATTRIBUTE((warn_unused_result)); @@ -219,7 +219,7 @@ row_rec_to_index_entry( /*===================*/ const rec_t* rec, /*!< in: record in the index */ const dict_index_t* index, /*!< in: index */ - const offset_t* offsets,/*!< in/out: rec_get_offsets(rec) */ + const rec_offs* offsets,/*!< in/out: rec_get_offsets(rec) */ mem_heap_t* heap) /*!< in: memory heap from which the memory needed is allocated */ MY_ATTRIBUTE((warn_unused_result)); @@ -262,7 +262,7 @@ row_build_row_ref_in_tuple( held as long as the row reference is used! */ const dict_index_t* index, /*!< in: secondary index */ - offset_t* offsets,/*!< in: rec_get_offsets(rec, index) + rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) or NULL */ trx_t* trx) /*!< in: transaction or NULL */ MY_ATTRIBUTE((nonnull(1,2,3))); @@ -281,7 +281,7 @@ row_build_row_ref_fast( const rec_t* rec, /*!< in: record in the index; must be preserved while ref is used, as we do not copy field values to heap */ - const offset_t* offsets);/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets);/*!< in: array returned by rec_get_offsets() */ /***************************************************************//** Searches the clustered index record for a row, if we have the row reference. diff --git a/storage/innobase/include/row0row.ic b/storage/innobase/include/row0row.ic index 3c5ed282709..a3dd51aaac2 100644 --- a/storage/innobase/include/row0row.ic +++ b/storage/innobase/include/row0row.ic @@ -36,7 +36,7 @@ ulint row_get_trx_id_offset( /*==================*/ const dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets)/*!< in: record offsets */ + const rec_offs* offsets)/*!< in: record offsets */ { ulint pos; ulint offset; @@ -63,7 +63,7 @@ row_get_rec_trx_id( /*===============*/ const rec_t* rec, /*!< in: record */ const dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets)/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets)/*!< in: rec_get_offsets(rec, index) */ { ulint offset; @@ -88,7 +88,7 @@ row_get_rec_roll_ptr( /*=================*/ const rec_t* rec, /*!< in: record */ const dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets)/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets)/*!< in: rec_get_offsets(rec, index) */ { ulint offset; @@ -147,7 +147,7 @@ row_build_row_ref_fast( const rec_t* rec, /*!< in: record in the index; must be preserved while ref is used, as we do not copy field values to heap */ - const offset_t* offsets)/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets)/*!< in: array returned by rec_get_offsets() */ { dfield_t* dfield; const byte* field; diff --git a/storage/innobase/include/row0upd.h b/storage/innobase/include/row0upd.h index cca86590f74..04701042658 100644 --- a/storage/innobase/include/row0upd.h +++ b/storage/innobase/include/row0upd.h @@ -124,7 +124,7 @@ row_upd_rec_sys_fields( page_zip_des_t* page_zip,/*!< in/out: compressed page whose uncompressed part will be updated, or NULL */ dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */ const trx_t* trx, /*!< in: transaction */ roll_ptr_t roll_ptr);/*!< in: DB_ROLL_PTR to the undo log */ /*********************************************************************//** @@ -166,7 +166,7 @@ ibool row_upd_changes_field_size_or_external( /*===================================*/ dict_index_t* index, /*!< in: index */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */ const upd_t* update);/*!< in: update vector */ /***********************************************************//** Returns true if row update contains disowned external fields. @@ -187,7 +187,7 @@ row_upd_rec_in_place( /*=================*/ rec_t* rec, /*!< in/out: record where replaced */ dict_index_t* index, /*!< in: the index the record belongs to */ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ const upd_t* update, /*!< in: update vector */ page_zip_des_t* page_zip);/*!< in: compressed page with enough space available, or NULL */ @@ -202,7 +202,7 @@ row_upd_build_sec_rec_difference_binary( /*====================================*/ const rec_t* rec, /*!< in: secondary index record */ dict_index_t* index, /*!< in: index */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */ const dtuple_t* entry, /*!< in: entry to insert */ mem_heap_t* heap) /*!< in: memory heap from which allocated */ MY_ATTRIBUTE((warn_unused_result, nonnull)); @@ -228,7 +228,7 @@ row_upd_build_difference_binary( dict_index_t* index, const dtuple_t* entry, const rec_t* rec, - const offset_t* offsets, + const rec_offs* offsets, bool no_sys, trx_t* trx, mem_heap_t* heap, @@ -398,7 +398,7 @@ row_upd_rec_sys_fields_in_recovery( /*===============================*/ rec_t* rec, /*!< in/out: record */ page_zip_des_t* page_zip,/*!< in/out: compressed page, or NULL */ - const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ + const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */ ulint pos, /*!< in: TRX_ID position in rec */ trx_id_t trx_id, /*!< in: transaction id */ roll_ptr_t roll_ptr);/*!< in: roll ptr of the undo log record */ diff --git a/storage/innobase/include/row0upd.ic b/storage/innobase/include/row0upd.ic index 68280ff567a..07e1c13d771 100644 --- a/storage/innobase/include/row0upd.ic +++ b/storage/innobase/include/row0upd.ic @@ -163,7 +163,7 @@ row_upd_rec_sys_fields( page_zip_des_t* page_zip,/*!< in/out: compressed page whose uncompressed part will be updated, or NULL */ dict_index_t* index, /*!< in: clustered index */ - const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ + const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */ const trx_t* trx, /*!< in: transaction */ roll_ptr_t roll_ptr)/*!< in: DB_ROLL_PTR to the undo log */ { diff --git a/storage/innobase/include/row0vers.h b/storage/innobase/include/row0vers.h index 2a76e27e226..3b1f16ef15f 100644 --- a/storage/innobase/include/row0vers.h +++ b/storage/innobase/include/row0vers.h @@ -50,7 +50,7 @@ trx_t* row_vers_impl_x_locked( const rec_t* rec, dict_index_t* index, - const offset_t* offsets); + const rec_offs* offsets); /*****************************************************************//** Finds out if we must preserve a delete marked earlier version of a clustered @@ -112,7 +112,7 @@ row_vers_build_for_consistent_read( mtr_t* mtr, /*!< in: mtr holding the latch on rec; it will also hold the latch on purge_view */ dict_index_t* index, /*!< in: the clustered index */ - offset_t** offsets,/*!< in/out: offsets returned by + rec_offs** offsets,/*!< in/out: offsets returned by rec_get_offsets(rec, index) */ ReadView* view, /*!< in: the consistent read view */ mem_heap_t** offset_heap,/*!< in/out: memory heap from which @@ -139,7 +139,7 @@ row_vers_build_for_semi_consistent_read( of this records */ mtr_t* mtr, /*!< in: mtr holding the latch on rec */ dict_index_t* index, /*!< in: the clustered index */ - offset_t** offsets,/*!< in/out: offsets returned by + rec_offs** offsets,/*!< in/out: offsets returned by rec_get_offsets(rec, index) */ mem_heap_t** offset_heap,/*!< in/out: memory heap from which the offsets are allocated */ diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h index 1be38545eb0..be06db4c954 100644 --- a/storage/innobase/include/trx0rec.h +++ b/storage/innobase/include/trx0rec.h @@ -207,7 +207,7 @@ trx_undo_report_row_operation( const rec_t* rec, /*!< in: case of an update or delete marking, the record in the clustered index; NULL if insert */ - const offset_t* offsets, /*!< in: rec_get_offsets(rec) */ + const rec_offs* offsets, /*!< in: rec_get_offsets(rec) */ roll_ptr_t* roll_ptr) /*!< out: DB_ROLL_PTR to the undo log record */ MY_ATTRIBUTE((nonnull(1,2,8), warn_unused_result)); @@ -240,7 +240,7 @@ trx_undo_prev_version_build( index_rec page and purge_view */ const rec_t* rec, /*!< in: version of a clustered index record */ dict_index_t* index, /*!< in: clustered index */ - offset_t* offsets,/*!< in/out: rec_get_offsets(rec, index) */ + rec_offs* offsets,/*!< in/out: rec_get_offsets(rec, index) */ mem_heap_t* heap, /*!< in: memory heap from which the memory needed is allocated */ rec_t** old_vers,/*!< out, own: previous version, or NULL if |