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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
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_is_empty:
...
@@ -2507,6 +2507,8 @@ ibuf_is_empty:
btr_pcur_open_at_rnd_pos
(
ibuf
->
index
,
BTR_SEARCH_LEAF
,
&
pcur
,
&
mtr
);
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
)
{
if
(
page_get_n_recs
(
btr_pcur_get_page
(
&
pcur
))
==
0
)
{
/* When the ibuf tree is emptied completely, the last record
/* When the ibuf tree is emptied completely, the last record
is removed using an optimistic delete and ibuf_size_update
is removed using an optimistic delete and ibuf_size_update
...
@@ -2840,6 +2842,7 @@ ibuf_get_volume_buffered(
...
@@ -2840,6 +2842,7 @@ ibuf_get_volume_buffered(
rec
=
btr_pcur_get_rec
(
pcur
);
rec
=
btr_pcur_get_rec
(
pcur
);
page
=
page_align
(
rec
);
page
=
page_align
(
rec
);
ut_ad
(
page_validate
(
page
,
ibuf
->
index
));
if
(
page_rec_is_supremum
(
rec
))
{
if
(
page_rec_is_supremum
(
rec
))
{
rec
=
page_rec_get_prev
(
rec
);
rec
=
page_rec_get_prev
(
rec
);
...
@@ -2861,6 +2864,7 @@ ibuf_get_volume_buffered(
...
@@ -2861,6 +2864,7 @@ ibuf_get_volume_buffered(
rec
,
hash_bitmap
,
UT_ARR_SIZE
(
hash_bitmap
),
n_recs
);
rec
,
hash_bitmap
,
UT_ARR_SIZE
(
hash_bitmap
),
n_recs
);
rec
=
page_rec_get_prev
(
rec
);
rec
=
page_rec_get_prev
(
rec
);
ut_ad
(
page_align
(
rec
)
==
page
);
}
}
/* Look at the previous page */
/* Look at the previous page */
...
@@ -2882,6 +2886,7 @@ ibuf_get_volume_buffered(
...
@@ -2882,6 +2886,7 @@ ibuf_get_volume_buffered(
prev_page
=
buf_block_get_frame
(
block
);
prev_page
=
buf_block_get_frame
(
block
);
ut_ad
(
page_validate
(
prev_page
,
ibuf
->
index
));
}
}
#ifdef UNIV_BTR_DEBUG
#ifdef UNIV_BTR_DEBUG
...
@@ -2912,6 +2917,7 @@ ibuf_get_volume_buffered(
...
@@ -2912,6 +2917,7 @@ ibuf_get_volume_buffered(
rec
,
hash_bitmap
,
sizeof
hash_bitmap
,
n_recs
);
rec
,
hash_bitmap
,
sizeof
hash_bitmap
,
n_recs
);
rec
=
page_rec_get_prev
(
rec
);
rec
=
page_rec_get_prev
(
rec
);
ut_ad
(
page_align
(
rec
)
==
prev_page
);
}
}
count_later:
count_later:
...
@@ -2958,6 +2964,7 @@ count_later:
...
@@ -2958,6 +2964,7 @@ count_later:
next_page
=
buf_block_get_frame
(
block
);
next_page
=
buf_block_get_frame
(
block
);
ut_ad
(
page_validate
(
next_page
,
ibuf
->
index
));
}
}
#ifdef UNIV_BTR_DEBUG
#ifdef UNIV_BTR_DEBUG
...
@@ -2985,6 +2992,7 @@ count_later:
...
@@ -2985,6 +2992,7 @@ count_later:
rec
,
hash_bitmap
,
sizeof
hash_bitmap
,
n_recs
);
rec
,
hash_bitmap
,
sizeof
hash_bitmap
,
n_recs
);
rec
=
page_rec_get_next
(
rec
);
rec
=
page_rec_get_next
(
rec
);
ut_ad
(
page_align
(
rec
)
==
next_page
);
}
}
}
}
...
@@ -3012,6 +3020,8 @@ ibuf_update_max_tablespace_id(void)
...
@@ -3012,6 +3020,8 @@ ibuf_update_max_tablespace_id(void)
btr_pcur_open_at_index_side
(
btr_pcur_open_at_index_side
(
FALSE
,
ibuf
->
index
,
BTR_SEARCH_LEAF
,
&
pcur
,
TRUE
,
&
mtr
);
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
);
btr_pcur_move_to_prev
(
&
pcur
,
&
mtr
);
if
(
btr_pcur_is_before_first_on_page
(
&
pcur
))
{
if
(
btr_pcur_is_before_first_on_page
(
&
pcur
))
{
...
@@ -3125,6 +3135,7 @@ ibuf_set_entry_counter(
...
@@ -3125,6 +3135,7 @@ ibuf_set_entry_counter(
byte
*
data
;
byte
*
data
;
/* pcur points to either a user rec or to a page's infimum record. */
/* 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
))
{
if
(
btr_pcur_is_on_user_rec
(
pcur
))
{
...
@@ -3364,6 +3375,7 @@ ibuf_insert_low(
...
@@ -3364,6 +3375,7 @@ ibuf_insert_low(
mtr_start
(
&
mtr
);
mtr_start
(
&
mtr
);
btr_pcur_open
(
ibuf
->
index
,
ibuf_entry
,
PAGE_CUR_LE
,
mode
,
&
pcur
,
&
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
/* Find out the volume of already buffered inserts for the same index
page */
page */
...
@@ -4349,6 +4361,8 @@ loop:
...
@@ -4349,6 +4361,8 @@ loop:
page_update_max_trx_id
(
block
,
page_zip
,
max_trx_id
,
page_update_max_trx_id
(
block
,
page_zip
,
max_trx_id
,
&
mtr
);
&
mtr
);
ut_ad
(
page_validate
(
page_align
(
rec
),
ibuf
->
index
));
entry
=
ibuf_build_entry_from_ibuf_rec
(
entry
=
ibuf_build_entry_from_ibuf_rec
(
rec
,
heap
,
&
dummy_index
);
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