Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f8e95d59
Commit
f8e95d59
authored
Mar 25, 2010
by
mmakela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/innodb+: ibuf: Add page_validate() and page_align() assertions.
parent
3fcec81d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
ibuf/ibuf0ibuf.c
ibuf/ibuf0ibuf.c
+14
-0
No files found.
ibuf/ibuf0ibuf.c
View file @
f8e95d59
...
...
@@ -2507,6 +2507,8 @@ ibuf_contract_ext(
btr_pcur_open_at_rnd_pos
(
ibuf
->
index
,
BTR_SEARCH_LEAF
,
&
pcur
,
&
mtr
);
ut_ad
(
page_validate
(
btr_pcur_get_page
(
&
pcur
),
ibuf
->
index
));
if
(
page_get_n_recs
(
btr_pcur_get_page
(
&
pcur
))
==
0
)
{
/* When the ibuf tree is emptied completely, the last record
is removed using an optimistic delete and ibuf_size_update
...
...
@@ -2840,6 +2842,7 @@ ibuf_get_volume_buffered(
rec
=
btr_pcur_get_rec
(
pcur
);
page
=
page_align
(
rec
);
ut_ad
(
page_validate
(
page
,
ibuf
->
index
));
if
(
page_rec_is_supremum
(
rec
))
{
rec
=
page_rec_get_prev
(
rec
);
...
...
@@ -2861,6 +2864,7 @@ ibuf_get_volume_buffered(
rec
,
hash_bitmap
,
UT_ARR_SIZE
(
hash_bitmap
),
n_recs
);
rec
=
page_rec_get_prev
(
rec
);
ut_ad
(
page_align
(
rec
)
==
page
);
}
/* Look at the previous page */
...
...
@@ -2882,6 +2886,7 @@ ibuf_get_volume_buffered(
prev_page
=
buf_block_get_frame
(
block
);
ut_ad
(
page_validate
(
prev_page
,
ibuf
->
index
));
}
#ifdef UNIV_BTR_DEBUG
...
...
@@ -2912,6 +2917,7 @@ ibuf_get_volume_buffered(
rec
,
hash_bitmap
,
sizeof
hash_bitmap
,
n_recs
);
rec
=
page_rec_get_prev
(
rec
);
ut_ad
(
page_align
(
rec
)
==
prev_page
);
}
count_later:
...
...
@@ -2958,6 +2964,7 @@ ibuf_get_volume_buffered(
next_page
=
buf_block_get_frame
(
block
);
ut_ad
(
page_validate
(
next_page
,
ibuf
->
index
));
}
#ifdef UNIV_BTR_DEBUG
...
...
@@ -2985,6 +2992,7 @@ ibuf_get_volume_buffered(
rec
,
hash_bitmap
,
sizeof
hash_bitmap
,
n_recs
);
rec
=
page_rec_get_next
(
rec
);
ut_ad
(
page_align
(
rec
)
==
next_page
);
}
}
...
...
@@ -3012,6 +3020,8 @@ ibuf_update_max_tablespace_id(void)
btr_pcur_open_at_index_side
(
FALSE
,
ibuf
->
index
,
BTR_SEARCH_LEAF
,
&
pcur
,
TRUE
,
&
mtr
);
ut_ad
(
page_validate
(
btr_pcur_get_page
(
&
pcur
),
ibuf
->
index
));
btr_pcur_move_to_prev
(
&
pcur
,
&
mtr
);
if
(
btr_pcur_is_before_first_on_page
(
&
pcur
))
{
...
...
@@ -3125,6 +3135,7 @@ ibuf_set_entry_counter(
byte
*
data
;
/* pcur points to either a user rec or to a page's infimum record. */
ut_ad
(
page_validate
(
btr_pcur_get_page
(
pcur
),
ibuf
->
index
));
if
(
btr_pcur_is_on_user_rec
(
pcur
))
{
...
...
@@ -3364,6 +3375,7 @@ ibuf_insert_low(
mtr_start
(
&
mtr
);
btr_pcur_open
(
ibuf
->
index
,
ibuf_entry
,
PAGE_CUR_LE
,
mode
,
&
pcur
,
&
mtr
);
ut_ad
(
page_validate
(
btr_pcur_get_page
(
&
pcur
),
ibuf
->
index
));
/* Find out the volume of already buffered inserts for the same index
page */
...
...
@@ -4349,6 +4361,8 @@ ibuf_merge_or_delete_for_page(
page_update_max_trx_id
(
block
,
page_zip
,
max_trx_id
,
&
mtr
);
ut_ad
(
page_validate
(
page_align
(
rec
),
ibuf
->
index
));
entry
=
ibuf_build_entry_from_ibuf_rec
(
rec
,
heap
,
&
dummy_index
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment