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
c476d38e
Commit
c476d38e
authored
Nov 23, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Remove buf_block_t:magic_n.
buf_block_state_valid(): New macro for replacing the magic_n check
parent
728902ea
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
9 deletions
+5
-9
btr/btr0sea.c
btr/btr0sea.c
+1
-1
buf/buf0buf.c
buf/buf0buf.c
+0
-6
include/buf0buf.h
include/buf0buf.h
+4
-2
No files found.
btr/btr0sea.c
View file @
c476d38e
...
...
@@ -356,7 +356,7 @@ btr_search_update_block_hash_info(
info
->
last_hash_succ
=
FALSE
;
ut_a
(
b
lock
->
magic_n
==
BUF_BLOCK_MAGIC_N
);
ut_a
(
b
uf_block_state_valid
(
block
)
);
ut_ad
(
info
->
magic_n
==
BTR_SEARCH_MAGIC_N
);
if
((
block
->
n_hash_helps
>
0
)
...
...
buf/buf0buf.c
View file @
c476d38e
...
...
@@ -603,8 +603,6 @@ buf_block_init(
buf_block_t
*
block
,
/* in: pointer to control block */
byte
*
frame
)
/* in: pointer to buffer frame */
{
block
->
magic_n
=
0
;
block
->
state
=
BUF_BLOCK_NOT_USED
;
block
->
frame
=
frame
;
...
...
@@ -1783,8 +1781,6 @@ buf_page_init_for_backup_restore(
buf_block_t
*
block
)
/* in: block to init */
{
/* Set the state of the block */
block
->
magic_n
=
BUF_BLOCK_MAGIC_N
;
buf_block_set_file_page
(
block
,
space
,
offset
);
block
->
lock_hash_val
=
0
;
...
...
@@ -1833,8 +1829,6 @@ buf_page_init(
ut_a
(
buf_block_get_state
(
block
)
!=
BUF_BLOCK_FILE_PAGE
);
/* Set the state of the block */
block
->
magic_n
=
BUF_BLOCK_MAGIC_N
;
buf_block_set_file_page
(
block
,
space
,
offset
);
block
->
check_index_page_at_flush
=
FALSE
;
...
...
include/buf0buf.h
View file @
c476d38e
...
...
@@ -708,7 +708,6 @@ struct buf_block_struct{
/* 1. General fields */
ulint
magic_n
;
/* magic number to check */
ulint
state
;
/* state of the control block:
BUF_BLOCK_NOT_USED, ...; changing
this is only allowed when a thread
...
...
@@ -870,7 +869,10 @@ struct buf_block_struct{
#endif
/* UNIV_DEBUG_FILE_ACCESSES */
};
#define BUF_BLOCK_MAGIC_N 41526563
/* Check if a block is in a valid state. */
#define buf_block_state_valid(block) \
(buf_block_get_state(block) >= BUF_BLOCK_NOT_USED \
&& (buf_block_get_state(block) <= BUF_BLOCK_REMOVE_HASH))
/* The buffer pool structure. NOTE! The definition appears here only for
other modules of this directory (buf) to see it. Do not use from outside! */
...
...
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