Skip to content

Commit ba2061d

Browse files
grooverdanrobertbindar
authored andcommitted
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)
1 parent c238e9b commit ba2061d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+648
-648
lines changed

storage/innobase/btr/btr0btr.cc

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ btr_node_ptr_set_child_page_no(
777777
rec_t* rec, /*!< in: node pointer record */
778778
page_zip_des_t* page_zip,/*!< in/out: compressed page whose uncompressed
779779
part will be updated, or NULL */
780-
const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */
780+
const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */
781781
ulint page_no,/*!< in: child node address */
782782
mtr_t* mtr) /*!< in: mtr */
783783
{
@@ -812,7 +812,7 @@ btr_node_ptr_get_child(
812812
/*===================*/
813813
const rec_t* node_ptr,/*!< in: node pointer */
814814
dict_index_t* index, /*!< in: index */
815-
const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */
815+
const rec_offs* offsets,/*!< in: array returned by rec_get_offsets() */
816816
mtr_t* mtr) /*!< in: mtr */
817817
{
818818
ut_ad(rec_offs_validate(node_ptr, index, offsets));
@@ -830,10 +830,10 @@ Returns the upper level node pointer to a page. It is assumed that mtr holds
830830
an sx-latch on the tree.
831831
@return rec_get_offsets() of the node pointer record */
832832
static
833-
offset_t*
833+
rec_offs*
834834
btr_page_get_father_node_ptr_func(
835835
/*==============================*/
836-
offset_t* offsets,/*!< in: work area for the return value */
836+
rec_offs* offsets,/*!< in: work area for the return value */
837837
mem_heap_t* heap, /*!< in: memory heap to use */
838838
btr_cur_t* cursor, /*!< in: cursor pointing to user record,
839839
out: cursor on node pointer record,
@@ -937,10 +937,10 @@ Returns the upper level node pointer to a page. It is assumed that mtr holds
937937
an x-latch on the tree.
938938
@return rec_get_offsets() of the node pointer record */
939939
static
940-
offset_t*
940+
rec_offs*
941941
btr_page_get_father_block(
942942
/*======================*/
943-
offset_t* offsets,/*!< in: work area for the return value */
943+
rec_offs* offsets,/*!< in: work area for the return value */
944944
mem_heap_t* heap, /*!< in: memory heap to use */
945945
dict_index_t* index, /*!< in: b-tree index */
946946
buf_block_t* block, /*!< in: child page in the index */
@@ -1814,7 +1814,7 @@ btr_root_raise_and_insert(
18141814
on the root page; when the function returns,
18151815
the cursor is positioned on the predecessor
18161816
of the inserted record */
1817-
offset_t** offsets,/*!< out: offsets on inserted record */
1817+
rec_offs** offsets,/*!< out: offsets on inserted record */
18181818
mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */
18191819
const dtuple_t* tuple, /*!< in: tuple to insert */
18201820
ulint n_ext, /*!< in: number of externally stored columns */
@@ -2125,7 +2125,7 @@ btr_page_get_split_rec(
21252125
rec_t* next_rec;
21262126
ulint n;
21272127
mem_heap_t* heap;
2128-
offset_t* offsets;
2128+
rec_offs* offsets;
21292129

21302130
page = btr_cur_get_page(cursor);
21312131

@@ -2231,7 +2231,7 @@ btr_page_insert_fits(
22312231
const rec_t* split_rec,/*!< in: suggestion for first record
22322232
on upper half-page, or NULL if
22332233
tuple to be inserted should be first */
2234-
offset_t** offsets,/*!< in: rec_get_offsets(
2234+
rec_offs** offsets,/*!< in: rec_get_offsets(
22352235
split_rec, cursor->index); out: garbage */
22362236
const dtuple_t* tuple, /*!< in: tuple to insert */
22372237
ulint n_ext, /*!< in: number of externally stored columns */
@@ -2331,8 +2331,8 @@ btr_insert_on_non_leaf_level_func(
23312331
dberr_t err;
23322332
rec_t* rec;
23332333
mem_heap_t* heap = NULL;
2334-
offset_t offsets_[REC_OFFS_NORMAL_SIZE];
2335-
offset_t* offsets = offsets_;
2334+
rec_offs offsets_[REC_OFFS_NORMAL_SIZE];
2335+
rec_offs* offsets = offsets_;
23362336
rec_offs_init(offsets_);
23372337
rtr_info_t rtr_info;
23382338

@@ -2441,7 +2441,7 @@ btr_attach_half_pages(
24412441
if (direction == FSP_DOWN) {
24422442

24432443
btr_cur_t cursor;
2444-
offset_t* offsets;
2444+
rec_offs* offsets;
24452445

24462446
lower_page = buf_block_get_frame(new_block);
24472447
lower_page_no = new_block->page.id.page_no();
@@ -2564,7 +2564,7 @@ btr_page_tuple_smaller(
25642564
/*===================*/
25652565
btr_cur_t* cursor, /*!< in: b-tree cursor */
25662566
const dtuple_t* tuple, /*!< in: tuple to consider */
2567-
offset_t** offsets,/*!< in/out: temporary storage */
2567+
rec_offs** offsets,/*!< in/out: temporary storage */
25682568
ulint n_uniq, /*!< in: number of unique fields
25692569
in the index page records */
25702570
mem_heap_t** heap) /*!< in/out: heap for offsets */
@@ -2604,7 +2604,7 @@ rec_t*
26042604
btr_insert_into_right_sibling(
26052605
ulint flags,
26062606
btr_cur_t* cursor,
2607-
offset_t** offsets,
2607+
rec_offs** offsets,
26082608
mem_heap_t* heap,
26092609
const dtuple_t* tuple,
26102610
ulint n_ext,
@@ -2741,7 +2741,7 @@ btr_page_split_and_insert(
27412741
btr_cur_t* cursor, /*!< in: cursor at which to insert; when the
27422742
function returns, the cursor is positioned
27432743
on the predecessor of the inserted record */
2744-
offset_t** offsets,/*!< out: offsets on inserted record */
2744+
rec_offs** offsets,/*!< out: offsets on inserted record */
27452745
mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */
27462746
const dtuple_t* tuple, /*!< in: tuple to insert */
27472747
ulint n_ext, /*!< in: number of externally stored columns */
@@ -3302,7 +3302,7 @@ btr_lift_page_up(
33023302

33033303
{
33043304
btr_cur_t cursor;
3305-
offset_t* offsets = NULL;
3305+
rec_offs* offsets = NULL;
33063306
mem_heap_t* heap = mem_heap_create(
33073307
sizeof(*offsets)
33083308
* (REC_OFFS_HEADER_SIZE + 1 + 1 + index->n_fields));
@@ -3487,7 +3487,7 @@ btr_compress(
34873487
page_t* page;
34883488
btr_cur_t father_cursor;
34893489
mem_heap_t* heap;
3490-
offset_t* offsets;
3490+
rec_offs* offsets;
34913491
ulint nth_rec = 0; /* remove bogus warning */
34923492
bool mbr_changed = false;
34933493
#ifdef UNIV_DEBUG
@@ -3631,7 +3631,7 @@ btr_compress(
36313631
if (is_left) {
36323632
btr_cur_t cursor2;
36333633
rtr_mbr_t new_mbr;
3634-
offset_t* offsets2 = NULL;
3634+
rec_offs* offsets2 = NULL;
36353635

36363636
/* For rtree, we need to update father's mbr. */
36373637
if (dict_index_is_spatial(index)) {
@@ -3829,7 +3829,7 @@ btr_compress(
38293829

38303830
/* For rtree, we need to update father's mbr. */
38313831
if (dict_index_is_spatial(index)) {
3832-
offset_t* offsets2;
3832+
rec_offs* offsets2;
38333833
ulint rec_info;
38343834

38353835
offsets2 = rec_get_offsets(
@@ -4276,7 +4276,7 @@ btr_print_recursive(
42764276
ulint width, /*!< in: print this many entries from start
42774277
and end */
42784278
mem_heap_t** heap, /*!< in/out: heap for rec_get_offsets() */
4279-
offset_t** offsets,/*!< in/out: buffer for rec_get_offsets() */
4279+
rec_offs** offsets,/*!< in/out: buffer for rec_get_offsets() */
42804280
mtr_t* mtr) /*!< in: mtr */
42814281
{
42824282
const page_t* page = buf_block_get_frame(block);
@@ -4340,8 +4340,8 @@ btr_print_index(
43404340
mtr_t mtr;
43414341
buf_block_t* root;
43424342
mem_heap_t* heap = NULL;
4343-
offset_t offsets_[REC_OFFS_NORMAL_SIZE];
4344-
offset_t* offsets = offsets_;
4343+
rec_offs offsets_[REC_OFFS_NORMAL_SIZE];
4344+
rec_offs* offsets = offsets_;
43454345
rec_offs_init(offsets_);
43464346

43474347
fputs("--------------------------\n"
@@ -4375,7 +4375,7 @@ btr_check_node_ptr(
43754375
{
43764376
mem_heap_t* heap;
43774377
dtuple_t* tuple;
4378-
offset_t* offsets;
4378+
rec_offs* offsets;
43794379
btr_cur_t cursor;
43804380
page_t* page = buf_block_get_frame(block);
43814381

@@ -4457,8 +4457,8 @@ btr_index_rec_validate(
44574457
ulint i;
44584458
const page_t* page;
44594459
mem_heap_t* heap = NULL;
4460-
offset_t offsets_[REC_OFFS_NORMAL_SIZE];
4461-
offset_t* offsets = offsets_;
4460+
rec_offs offsets_[REC_OFFS_NORMAL_SIZE];
4461+
rec_offs* offsets = offsets_;
44624462
rec_offs_init(offsets_);
44634463

44644464
page = page_align(rec);
@@ -4691,8 +4691,8 @@ btr_validate_level(
46914691
bool ret = true;
46924692
mtr_t mtr;
46934693
mem_heap_t* heap = mem_heap_create(256);
4694-
offset_t* offsets = NULL;
4695-
offset_t* offsets2= NULL;
4694+
rec_offs* offsets = NULL;
4695+
rec_offs* offsets2= NULL;
46964696
#ifdef UNIV_ZIP_DEBUG
46974697
page_zip_des_t* page_zip;
46984698
#endif /* UNIV_ZIP_DEBUG */

storage/innobase/btr/btr0bulk.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ PageBulk::init()
178178
void
179179
PageBulk::insert(
180180
const rec_t* rec,
181-
offset_t* offsets)
181+
rec_offs* offsets)
182182
{
183183
ulint rec_size;
184184

@@ -190,7 +190,7 @@ PageBulk::insert(
190190
/* Check whether records are in order. */
191191
if (!page_rec_is_infimum(m_cur_rec)) {
192192
rec_t* old_rec = m_cur_rec;
193-
offset_t* old_offsets = rec_get_offsets(
193+
rec_offs* old_offsets = rec_get_offsets(
194194
old_rec, m_index, NULL, page_rec_is_leaf(old_rec),
195195
ULINT_UNDEFINED, &m_heap);
196196

@@ -402,7 +402,7 @@ rec_t*
402402
PageBulk::getSplitRec()
403403
{
404404
rec_t* rec;
405-
offset_t* offsets;
405+
rec_offs* offsets;
406406
ulint total_used_size;
407407
ulint total_recs_size;
408408
ulint n_recs;
@@ -448,7 +448,7 @@ PageBulk::copyIn(
448448
{
449449

450450
rec_t* rec = split_rec;
451-
offset_t* offsets = NULL;
451+
rec_offs* offsets = NULL;
452452

453453
ut_ad(m_rec_no == 0);
454454
ut_ad(page_rec_is_user_rec(rec));
@@ -494,7 +494,7 @@ PageBulk::copyOut(
494494
ut_ad(n > 0);
495495

496496
/* Set last record's next in page */
497-
offset_t* offsets = NULL;
497+
rec_offs* offsets = NULL;
498498
rec = page_rec_get_prev(split_rec);
499499
offsets = rec_get_offsets(rec, m_index, offsets,
500500
page_rec_is_leaf(split_rec),
@@ -604,7 +604,7 @@ the blob data is logged first, then the record is logged in bulk mode.
604604
dberr_t
605605
PageBulk::storeExt(
606606
const big_rec_t* big_rec,
607-
offset_t* offsets)
607+
rec_offs* offsets)
608608
{
609609
/* Note: not all fileds are initialized in btr_pcur. */
610610
btr_pcur_t btr_pcur;
@@ -864,7 +864,7 @@ BtrBulk::insert(
864864
ulint rec_size = rec_get_converted_size(m_index, tuple, n_ext);
865865
big_rec_t* big_rec = NULL;
866866
rec_t* rec = NULL;
867-
offset_t* offsets = NULL;
867+
rec_offs* offsets = NULL;
868868

869869
if (page_bulk->needExt(tuple, rec_size)) {
870870
/* The record is so big that we have to store some fields

0 commit comments

Comments
 (0)