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
b41b4a39
Commit
b41b4a39
authored
Sep 26, 2008
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: fsp0fsp.c: Revert r2681 in a sense, by turning the
ut_a() assertions into ut_ad() assertions.
parent
63c3eac7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
fsp/fsp0fsp.c
fsp/fsp0fsp.c
+22
-20
No files found.
fsp/fsp0fsp.c
View file @
b41b4a39
...
...
@@ -347,9 +347,9 @@ fsp_get_space_header(
header
=
FSP_HEADER_OFFSET
+
buf_block_get_frame
(
block
);
buf_block_dbg_add_level
(
block
,
SYNC_FSP_PAGE
);
ut_a
(
id
==
mach_read_from_4
(
FSP_SPACE_ID
+
header
));
ut_a
(
zip_size
==
dict_table_flags_to_zip_size
(
mach_read_from_4
(
FSP_SPACE_FLAGS
+
header
)));
ut_a
d
(
id
==
mach_read_from_4
(
FSP_SPACE_ID
+
header
));
ut_a
d
(
zip_size
==
dict_table_flags_to_zip_size
(
mach_read_from_4
(
FSP_SPACE_FLAGS
+
header
)));
return
(
header
);
}
...
...
@@ -699,7 +699,7 @@ xdes_get_descriptor_with_space_hdr(
MTR_MEMO_X_LOCK
));
ut_ad
(
mtr_memo_contains_page
(
mtr
,
sp_header
,
MTR_MEMO_PAGE_S_FIX
)
||
mtr_memo_contains_page
(
mtr
,
sp_header
,
MTR_MEMO_PAGE_X_FIX
));
ut_a
(
page_offset
(
sp_header
)
==
FSP_HEADER_OFFSET
);
ut_a
d
(
page_offset
(
sp_header
)
==
FSP_HEADER_OFFSET
);
/* Read free limit and space size */
limit
=
mach_read_from_4
(
sp_header
+
FSP_FREE_LIMIT
);
size
=
mach_read_from_4
(
sp_header
+
FSP_SIZE
);
...
...
@@ -1312,7 +1312,7 @@ fsp_fill_free_list(
mtr_t
ibuf_mtr
;
ut_ad
(
header
&&
mtr
);
ut_a
(
page_offset
(
header
)
==
FSP_HEADER_OFFSET
);
ut_a
d
(
page_offset
(
header
)
==
FSP_HEADER_OFFSET
);
/* Check if we can fill free list from above the free list limit */
size
=
mtr_read_ulint
(
header
+
FSP_SIZE
,
MLOG_4BYTES
,
mtr
);
...
...
@@ -1862,7 +1862,7 @@ fsp_alloc_seg_inode_page(
ulint
zip_size
;
ulint
i
;
ut_a
(
page_offset
(
space_header
)
==
FSP_HEADER_OFFSET
);
ut_a
d
(
page_offset
(
space_header
)
==
FSP_HEADER_OFFSET
);
space
=
page_get_space_id
(
page_align
(
space_header
));
zip_size
=
dict_table_flags_to_zip_size
(
...
...
@@ -1917,7 +1917,7 @@ fsp_alloc_seg_inode(
ulint
zip_size
;
ulint
n
;
ut_a
(
page_offset
(
space_header
)
==
FSP_HEADER_OFFSET
);
ut_a
d
(
page_offset
(
space_header
)
==
FSP_HEADER_OFFSET
);
if
(
flst_get_len
(
space_header
+
FSP_SEG_INODES_FREE
,
mtr
)
==
0
)
{
/* Allocate a new segment inode page */
...
...
@@ -1980,7 +1980,7 @@ fsp_free_seg_inode(
space_header
=
fsp_get_space_header
(
space
,
zip_size
,
mtr
);
ut_a
(
mach_read_from_4
(
inode
+
FSEG_MAGIC_N
)
==
FSEG_MAGIC_N_VALUE
);
ut_a
d
(
mach_read_from_4
(
inode
+
FSEG_MAGIC_N
)
==
FSEG_MAGIC_N_VALUE
);
if
(
ULINT_UNDEFINED
==
fsp_seg_inode_page_find_free
(
page
,
0
,
zip_size
,
mtr
))
{
...
...
@@ -2027,11 +2027,11 @@ fseg_inode_get(
inode_addr
.
page
=
mach_read_from_4
(
header
+
FSEG_HDR_PAGE_NO
);
inode_addr
.
boffset
=
mach_read_from_2
(
header
+
FSEG_HDR_OFFSET
);
ut_a
(
space
==
mach_read_from_4
(
header
+
FSEG_HDR_SPACE
));
ut_a
d
(
space
==
mach_read_from_4
(
header
+
FSEG_HDR_SPACE
));
inode
=
fut_get_ptr
(
space
,
zip_size
,
inode_addr
,
RW_X_LATCH
,
mtr
);
ut_a
(
mach_read_from_4
(
inode
+
FSEG_MAGIC_N
)
==
FSEG_MAGIC_N_VALUE
);
ut_a
d
(
mach_read_from_4
(
inode
+
FSEG_MAGIC_N
)
==
FSEG_MAGIC_N_VALUE
);
return
(
inode
);
}
...
...
@@ -2398,7 +2398,7 @@ fseg_fill_free_list(
ulint
used
;
ut_ad
(
inode
&&
mtr
);
ut_a
(
!
((
page_offset
(
inode
)
-
FSEG_ARR_OFFSET
)
%
FSEG_INODE_SIZE
));
ut_a
d
(
!
((
page_offset
(
inode
)
-
FSEG_ARR_OFFSET
)
%
FSEG_INODE_SIZE
));
reserved
=
fseg_n_reserved_pages_low
(
inode
,
&
used
,
mtr
);
...
...
@@ -2459,7 +2459,7 @@ fseg_alloc_free_extent(
dulint
seg_id
;
fil_addr_t
first
;
ut_a
(
!
((
page_offset
(
inode
)
-
FSEG_ARR_OFFSET
)
%
FSEG_INODE_SIZE
));
ut_a
d
(
!
((
page_offset
(
inode
)
-
FSEG_ARR_OFFSET
)
%
FSEG_INODE_SIZE
));
if
(
flst_get_len
(
inode
+
FSEG_FREE
,
mtr
)
>
0
)
{
/* Segment free list is not empty, allocate from it */
...
...
@@ -2528,8 +2528,9 @@ fseg_alloc_free_page_low(
ut_ad
(
mtr
);
ut_ad
((
direction
>=
FSP_UP
)
&&
(
direction
<=
FSP_NO_DIR
));
ut_a
(
mach_read_from_4
(
seg_inode
+
FSEG_MAGIC_N
)
==
FSEG_MAGIC_N_VALUE
);
ut_a
(
!
((
page_offset
(
seg_inode
)
-
FSEG_ARR_OFFSET
)
%
FSEG_INODE_SIZE
));
ut_ad
(
mach_read_from_4
(
seg_inode
+
FSEG_MAGIC_N
)
==
FSEG_MAGIC_N_VALUE
);
ut_ad
(
!
((
page_offset
(
seg_inode
)
-
FSEG_ARR_OFFSET
)
%
FSEG_INODE_SIZE
));
seg_id
=
mtr_read_dulint
(
seg_inode
+
FSEG_ID
,
mtr
);
ut_ad
(
!
ut_dulint_is_zero
(
seg_id
));
...
...
@@ -3119,12 +3120,12 @@ fseg_mark_page_used(
ulint
not_full_n_used
;
ut_ad
(
seg_inode
&&
mtr
);
ut_a
(
!
((
page_offset
(
seg_inode
)
-
FSEG_ARR_OFFSET
)
%
FSEG_INODE_SIZE
));
ut_a
d
(
!
((
page_offset
(
seg_inode
)
-
FSEG_ARR_OFFSET
)
%
FSEG_INODE_SIZE
));
descr
=
xdes_get_descriptor
(
space
,
zip_size
,
page
,
mtr
);
ut_a
(
mtr_read_ulint
(
seg_inode
+
FSEG_ID
,
MLOG_4BYTES
,
mtr
)
==
mtr_read_ulint
(
descr
+
XDES_ID
,
MLOG_4BYTES
,
mtr
));
ut_a
d
(
mtr_read_ulint
(
seg_inode
+
FSEG_ID
,
MLOG_4BYTES
,
mtr
)
==
mtr_read_ulint
(
descr
+
XDES_ID
,
MLOG_4BYTES
,
mtr
));
if
(
xdes_is_free
(
descr
,
mtr
))
{
/* We move the extent from the free list to the
...
...
@@ -3180,8 +3181,9 @@ fseg_free_page_low(
ulint
i
;
ut_ad
(
seg_inode
&&
mtr
);
ut_a
(
mach_read_from_4
(
seg_inode
+
FSEG_MAGIC_N
)
==
FSEG_MAGIC_N_VALUE
);
ut_a
(
!
((
page_offset
(
seg_inode
)
-
FSEG_ARR_OFFSET
)
%
FSEG_INODE_SIZE
));
ut_ad
(
mach_read_from_4
(
seg_inode
+
FSEG_MAGIC_N
)
==
FSEG_MAGIC_N_VALUE
);
ut_ad
(
!
((
page_offset
(
seg_inode
)
-
FSEG_ARR_OFFSET
)
%
FSEG_INODE_SIZE
));
/* Drop search system page hash index if the page is found in
the pool and is hashed */
...
...
@@ -3656,7 +3658,7 @@ fseg_validate_low(
ulint
n_used2
=
0
;
ut_ad
(
mtr_memo_contains_page
(
mtr2
,
inode
,
MTR_MEMO_PAGE_X_FIX
));
ut_a
(
mach_read_from_4
(
inode
+
FSEG_MAGIC_N
)
==
FSEG_MAGIC_N_VALUE
);
ut_a
d
(
mach_read_from_4
(
inode
+
FSEG_MAGIC_N
)
==
FSEG_MAGIC_N_VALUE
);
space
=
page_get_space_id
(
page_align
(
inode
));
...
...
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