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
53853ee5
Commit
53853ee5
authored
Nov 24, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Replace all references to block->space and block->offset,
which should have been replaced in r1057.
parent
9580b5f2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
27 deletions
+48
-27
btr/btr0btr.c
btr/btr0btr.c
+2
-2
buf/buf0buf.c
buf/buf0buf.c
+31
-15
buf/buf0flu.c
buf/buf0flu.c
+6
-4
buf/buf0lru.c
buf/buf0lru.c
+7
-4
ibuf/ibuf0ibuf.c
ibuf/ibuf0ibuf.c
+2
-2
No files found.
btr/btr0btr.c
View file @
53853ee5
...
@@ -2566,7 +2566,7 @@ btr_discard_page(
...
@@ -2566,7 +2566,7 @@ btr_discard_page(
block
=
btr_cur_get_block
(
cursor
);
block
=
btr_cur_get_block
(
cursor
);
index
=
btr_cur_get_index
(
cursor
);
index
=
btr_cur_get_index
(
cursor
);
ut_ad
(
dict_index_get_page
(
index
)
!=
b
lock
->
offset
);
ut_ad
(
dict_index_get_page
(
index
)
!=
b
uf_block_get_page_no
(
block
)
);
ut_ad
(
mtr_memo_contains
(
mtr
,
dict_index_get_lock
(
index
),
ut_ad
(
mtr_memo_contains
(
mtr
,
dict_index_get_lock
(
index
),
MTR_MEMO_X_LOCK
));
MTR_MEMO_X_LOCK
));
ut_ad
(
mtr_memo_contains
(
mtr
,
block
,
MTR_MEMO_PAGE_X_FIX
));
ut_ad
(
mtr_memo_contains
(
mtr
,
block
,
MTR_MEMO_PAGE_X_FIX
));
...
@@ -2802,7 +2802,7 @@ btr_check_node_ptr(
...
@@ -2802,7 +2802,7 @@ btr_check_node_ptr(
page_t
*
page
=
buf_block_get_frame
(
block
);
page_t
*
page
=
buf_block_get_frame
(
block
);
ut_ad
(
mtr_memo_contains
(
mtr
,
block
,
MTR_MEMO_PAGE_X_FIX
));
ut_ad
(
mtr_memo_contains
(
mtr
,
block
,
MTR_MEMO_PAGE_X_FIX
));
if
(
dict_index_get_page
(
index
)
==
b
lock
->
offset
)
{
if
(
dict_index_get_page
(
index
)
==
b
uf_block_get_page_no
(
block
)
)
{
return
(
TRUE
);
return
(
TRUE
);
}
}
...
...
buf/buf0buf.c
View file @
53853ee5
...
@@ -1543,7 +1543,8 @@ loop:
...
@@ -1543,7 +1543,8 @@ loop:
}
}
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_DEBUG
ut_a
(
ibuf_count_get
(
block
->
space
,
block
->
offset
)
==
0
);
ut_a
(
ibuf_count_get
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
block
))
==
0
);
#endif
#endif
return
(
block
);
return
(
block
);
}
}
...
@@ -1595,8 +1596,9 @@ buf_page_optimistic_get_func(
...
@@ -1595,8 +1596,9 @@ buf_page_optimistic_get_func(
/* Check if this is the first access to the page */
/* Check if this is the first access to the page */
ut_ad
(
!
ibuf_inside
()
ut_ad
(
!
ibuf_inside
()
||
ibuf_page
(
block
->
space
,
buf_block_get_zip_size
(
block
),
||
ibuf_page
(
buf_block_get_space
(
block
),
block
->
offset
));
buf_block_get_zip_size
(
block
),
buf_block_get_page_no
(
block
)));
if
(
rw_latch
==
RW_S_LATCH
)
{
if
(
rw_latch
==
RW_S_LATCH
)
{
success
=
rw_lock_s_lock_func_nowait
(
&
(
block
->
lock
),
success
=
rw_lock_s_lock_func_nowait
(
&
(
block
->
lock
),
...
@@ -1664,7 +1666,8 @@ buf_page_optimistic_get_func(
...
@@ -1664,7 +1666,8 @@ buf_page_optimistic_get_func(
}
}
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_DEBUG
ut_a
(
ibuf_count_get
(
block
->
space
,
block
->
offset
)
==
0
);
ut_a
(
ibuf_count_get
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
block
))
==
0
);
#endif
#endif
buf_pool
->
n_page_gets
++
;
buf_pool
->
n_page_gets
++
;
...
@@ -1760,7 +1763,8 @@ buf_page_get_known_nowait(
...
@@ -1760,7 +1763,8 @@ buf_page_get_known_nowait(
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_DEBUG
ut_a
((
mode
==
BUF_KEEP_OLD
)
ut_a
((
mode
==
BUF_KEEP_OLD
)
||
(
ibuf_count_get
(
block
->
space
,
block
->
offset
)
==
0
));
||
(
ibuf_count_get
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
block
))
==
0
));
#endif
#endif
buf_pool
->
n_page_gets
++
;
buf_pool
->
n_page_gets
++
;
...
@@ -2022,7 +2026,8 @@ buf_page_create(
...
@@ -2022,7 +2026,8 @@ buf_page_create(
if
(
block
!=
NULL
)
{
if
(
block
!=
NULL
)
{
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_DEBUG
ut_a
(
ibuf_count_get
(
block
->
space
,
block
->
offset
)
==
0
);
ut_a
(
ibuf_count_get
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
block
))
==
0
);
#endif
#endif
#ifdef UNIV_DEBUG_FILE_ACCESSES
#ifdef UNIV_DEBUG_FILE_ACCESSES
block
->
file_page_was_freed
=
FALSE
;
block
->
file_page_was_freed
=
FALSE
;
...
@@ -2095,7 +2100,8 @@ buf_page_create(
...
@@ -2095,7 +2100,8 @@ buf_page_create(
ut_a
(
++
buf_dbg_counter
%
357
||
buf_validate
());
ut_a
(
++
buf_dbg_counter
%
357
||
buf_validate
());
#endif
/* UNIV_DEBUG || UNIV_BUF_DEBUG */
#endif
/* UNIV_DEBUG || UNIV_BUF_DEBUG */
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_DEBUG
ut_a
(
ibuf_count_get
(
block
->
space
,
block
->
offset
)
==
0
);
ut_a
(
ibuf_count_get
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
block
))
==
0
);
#endif
#endif
return
(
block
);
return
(
block
);
}
}
...
@@ -2188,9 +2194,9 @@ buf_page_io_complete(
...
@@ -2188,9 +2194,9 @@ buf_page_io_complete(
&&
block
->
page
.
space
!=
read_space_id
)
&&
block
->
page
.
space
!=
read_space_id
)
||
block
->
page
.
offset
!=
read_page_no
)
{
||
block
->
page
.
offset
!=
read_page_no
)
{
/* We did not compare space_id to read_space_id
/* We did not compare space_id to read_space_id
if block->space == 0, because the field on the
if block->
page.
space == 0, because the field on the
page may contain garbage in MySQL < 4.1.1,
page may contain garbage in MySQL < 4.1.1,
which only supported block->space == 0. */
which only supported block->
page.
space == 0. */
ut_print_timestamp
(
stderr
);
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
fprintf
(
stderr
,
...
@@ -2267,7 +2273,8 @@ corrupt:
...
@@ -2267,7 +2273,8 @@ corrupt:
mutex_enter
(
&
block
->
mutex
);
mutex_enter
(
&
block
->
mutex
);
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_DEBUG
ut_a
(
ibuf_count_get
(
block
->
space
,
block
->
offset
)
==
0
);
ut_a
(
ibuf_count_get
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
block
))
==
0
);
#endif
#endif
/* Because this thread which does the unlocking is not the same that
/* Because this thread which does the unlocking is not the same that
did the locking, we use a pass value != 0 in unlock, which simply
did the locking, we use a pass value != 0 in unlock, which simply
...
@@ -2317,7 +2324,8 @@ corrupt:
...
@@ -2317,7 +2324,8 @@ corrupt:
#ifdef UNIV_DEBUG
#ifdef UNIV_DEBUG
if
(
buf_debug_prints
)
{
if
(
buf_debug_prints
)
{
fprintf
(
stderr
,
"page space %lu page no %lu
\n
"
,
fprintf
(
stderr
,
"page space %lu page no %lu
\n
"
,
(
ulong
)
block
->
space
,
(
ulong
)
block
->
offset
);
(
ulong
)
buf_block_get_space
(
block
),
(
ulong
)
buf_block_get_page_no
(
block
));
}
}
#endif
/* UNIV_DEBUG */
#endif
/* UNIV_DEBUG */
}
}
...
@@ -2382,17 +2390,25 @@ buf_validate(void)
...
@@ -2382,17 +2390,25 @@ buf_validate(void)
mutex_enter
(
&
block
->
mutex
);
mutex_enter
(
&
block
->
mutex
);
switch
(
buf_block_get_state
(
block
))
{
switch
(
buf_block_get_state
(
block
))
{
case
BUF_BLOCK_ZIP_PAGE
:
/* TODO: validate page_zip */
ut_error
;
break
;
case
BUF_BLOCK_FILE_PAGE
:
case
BUF_BLOCK_FILE_PAGE
:
ut_a
(
buf_page_hash_get
(
block
->
space
,
ut_a
(
buf_page_hash_get
(
buf_block_get_space
(
block
->
offset
)
block
),
buf_block_get_page_no
(
block
))
==
block
);
==
block
);
n_page
++
;
n_page
++
;
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_DEBUG
ut_a
((
block
->
io_fix
==
BUF_IO_READ
)
ut_a
((
block
->
io_fix
==
BUF_IO_READ
)
||
!
ibuf_count_get
(
block
->
space
,
||
!
ibuf_count_get
(
buf_block_get_space
(
block
->
offset
));
block
),
buf_block_get_page_no
(
block
)));
#endif
#endif
if
(
block
->
io_fix
==
BUF_IO_WRITE
)
{
if
(
block
->
io_fix
==
BUF_IO_WRITE
)
{
...
...
buf/buf0flu.c
View file @
53853ee5
...
@@ -586,7 +586,8 @@ buf_flush_write_block_low(
...
@@ -586,7 +586,8 @@ buf_flush_write_block_low(
ut_a
(
buf_block_get_state
(
block
)
==
BUF_BLOCK_FILE_PAGE
);
ut_a
(
buf_block_get_state
(
block
)
==
BUF_BLOCK_FILE_PAGE
);
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_DEBUG
ut_a
(
ibuf_count_get
(
block
->
space
,
block
->
offset
)
==
0
);
ut_a
(
ibuf_count_get
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
block
))
==
0
);
#endif
#endif
ut_ad
(
!
ut_dulint_is_zero
(
block
->
newest_modification
));
ut_ad
(
!
ut_dulint_is_zero
(
block
->
newest_modification
));
...
@@ -689,7 +690,8 @@ buf_flush_try_page(
...
@@ -689,7 +690,8 @@ buf_flush_try_page(
if
(
buf_debug_prints
)
{
if
(
buf_debug_prints
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"Flushing page space %lu, page no %lu
\n
"
,
"Flushing page space %lu, page no %lu
\n
"
,
(
ulong
)
block
->
space
,
(
ulong
)
block
->
offset
);
(
ulong
)
buf_block_get_space
(
block
),
(
ulong
)
buf_block_get_page_no
(
block
));
}
}
#endif
/* UNIV_DEBUG */
#endif
/* UNIV_DEBUG */
...
@@ -756,8 +758,8 @@ buf_flush_try_page(
...
@@ -756,8 +758,8 @@ buf_flush_try_page(
fprintf
(
stderr
,
fprintf
(
stderr
,
"Flushing single page space %lu,"
"Flushing single page space %lu,"
" page no %lu
\n
"
,
" page no %lu
\n
"
,
(
ulong
)
b
lock
->
space
,
(
ulong
)
b
uf_block_get_space
(
block
)
,
(
ulong
)
b
lock
->
offset
);
(
ulong
)
b
uf_block_get_page_no
(
block
)
);
}
}
#endif
/* UNIV_DEBUG */
#endif
/* UNIV_DEBUG */
...
...
buf/buf0lru.c
View file @
53853ee5
...
@@ -110,8 +110,8 @@ scan_again:
...
@@ -110,8 +110,8 @@ scan_again:
if
(
buf_debug_prints
)
{
if
(
buf_debug_prints
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"Dropping space %lu page %lu
\n
"
,
"Dropping space %lu page %lu
\n
"
,
(
ulong
)
b
lock
->
space
,
(
ulong
)
b
uf_block_get_space
(
block
)
,
(
ulong
)
b
lock
->
offset
);
(
ulong
)
b
uf_block_get_page_no
(
block
)
);
}
}
#endif
#endif
if
(
block
->
is_hashed
)
{
if
(
block
->
is_hashed
)
{
...
@@ -217,7 +217,8 @@ buf_LRU_free_block(
...
@@ -217,7 +217,8 @@ buf_LRU_free_block(
#ifdef UNIV_DEBUG
#ifdef UNIV_DEBUG
if
(
buf_debug_prints
)
{
if
(
buf_debug_prints
)
{
fprintf
(
stderr
,
"Putting space %lu page %lu to free list
\n
"
,
fprintf
(
stderr
,
"Putting space %lu page %lu to free list
\n
"
,
(
ulong
)
block
->
space
,
(
ulong
)
block
->
offset
);
(
ulong
)
buf_block_get_space
(
block
),
(
ulong
)
buf_block_get_page_no
(
block
));
}
}
#endif
/* UNIV_DEBUG */
#endif
/* UNIV_DEBUG */
...
@@ -1073,7 +1074,9 @@ buf_LRU_print(void)
...
@@ -1073,7 +1074,9 @@ buf_LRU_print(void)
while
(
block
!=
NULL
)
{
while
(
block
!=
NULL
)
{
fprintf
(
stderr
,
"BLOCK %lu "
,
(
ulong
)
block
->
offset
);
fprintf
(
stderr
,
"BLOCK space %lu page %lu "
,
(
ulong
)
buf_block_get_space
(
block
),
(
ulong
)
buf_block_get_page_no
(
block
));
if
(
block
->
old
)
{
if
(
block
->
old
)
{
fputs
(
"old "
,
stderr
);
fputs
(
"old "
,
stderr
);
...
...
ibuf/ibuf0ibuf.c
View file @
53853ee5
...
@@ -3140,8 +3140,8 @@ ibuf_merge_or_delete_for_page(
...
@@ -3140,8 +3140,8 @@ ibuf_merge_or_delete_for_page(
ibool
corruption_noticed
=
FALSE
;
ibool
corruption_noticed
=
FALSE
;
mtr_t
mtr
;
mtr_t
mtr
;
ut_ad
(
!
block
||
b
lock
->
space
==
space
);
ut_ad
(
!
block
||
b
uf_block_get_space
(
block
)
==
space
);
ut_ad
(
!
block
||
b
lock
->
offset
==
page_no
);
ut_ad
(
!
block
||
b
uf_block_get_page_no
(
block
)
==
page_no
);
ut_ad
(
!
block
||
buf_block_get_zip_size
(
block
)
==
zip_size
);
ut_ad
(
!
block
||
buf_block_get_zip_size
(
block
)
==
zip_size
);
if
(
srv_force_recovery
>=
SRV_FORCE_NO_IBUF_MERGE
)
{
if
(
srv_force_recovery
>=
SRV_FORCE_NO_IBUF_MERGE
)
{
...
...
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