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
94ca1bb1
Commit
94ca1bb1
authored
Mar 20, 2009
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: recv_recover_page(): Remove compile-time constant parameters.
parent
6b52f8ca
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
47 deletions
+51
-47
ChangeLog
ChangeLog
+5
-0
buf/buf0buf.c
buf/buf0buf.c
+1
-1
include/log0recv.h
include/log0recv.h
+9
-7
log/log0recv.c
log/log0recv.c
+36
-39
No files found.
ChangeLog
View file @
94ca1bb1
2009-03-20 The InnoDB Team
* buf/buf0buf.c, include/log0recv.h, log/log0recv.c:
Remove the compile-time constant parameters of recv_recover_page().
2009-03-20 The InnoDB Team
2009-03-20 The InnoDB Team
* data/data0type.c, handler/ha_innodb.cc, include/ha_prototypes.h:
* data/data0type.c, handler/ha_innodb.cc, include/ha_prototypes.h:
...
...
buf/buf0buf.c
View file @
94ca1bb1
...
@@ -3177,7 +3177,7 @@ buf_page_io_complete(
...
@@ -3177,7 +3177,7 @@ buf_page_io_complete(
if
(
recv_recovery_is_on
())
{
if
(
recv_recovery_is_on
())
{
/* Pages must be uncompressed for crash recovery. */
/* Pages must be uncompressed for crash recovery. */
ut_a
(
uncompressed
);
ut_a
(
uncompressed
);
recv_recover_page
(
FALSE
,
TRUE
,
(
buf_block_t
*
)
bpage
);
recv_recover_page
(
TRUE
,
(
buf_block_t
*
)
bpage
);
}
}
if
(
uncompressed
&&
!
recv_no_ibuf_operations
)
{
if
(
uncompressed
&&
!
recv_no_ibuf_operations
)
{
...
...
include/log0recv.h
View file @
94ca1bb1
...
@@ -89,17 +89,19 @@ lsn of a log record. This can be called when a buffer page has just been
...
@@ -89,17 +89,19 @@ lsn of a log record. This can be called when a buffer page has just been
read in, or also for a page already in the buffer pool. */
read in, or also for a page already in the buffer pool. */
UNIV_INTERN
UNIV_INTERN
void
void
recv_recover_page
(
recv_recover_page_func
(
/*==============*/
/*===================*/
ibool
recover_backup
,
#ifndef UNIV_HOTBACKUP
/* in: TRUE if we are recovering a backup
page: then we do not acquire any latches
since the page was read in outside the
buffer pool */
ibool
just_read_in
,
ibool
just_read_in
,
/* in: TRUE if the i/o-handler calls this for
/* in: TRUE if the i/o-handler calls this for
a freshly read page */
a freshly read page */
#endif
/* !UNIV_HOTBACKUP */
buf_block_t
*
block
);
/* in: buffer block */
buf_block_t
*
block
);
/* in: buffer block */
#ifndef UNIV_HOTBACKUP
# define recv_recover_page(jri, block) recv_recover_page_func(jri, block)
#else
/* !UNIV_HOTBACKUP */
# define recv_recover_page(jri, block) recv_recover_page_func(block)
#endif
/* !UNIV_HOTBACKUP */
/************************************************************
/************************************************************
Recovers from a checkpoint. When this function returns, the database is able
Recovers from a checkpoint. When this function returns, the database is able
to start processing of new user transactions, but the function
to start processing of new user transactions, but the function
...
...
log/log0recv.c
View file @
94ca1bb1
...
@@ -1186,16 +1186,13 @@ lsn of a log record. This can be called when a buffer page has just been
...
@@ -1186,16 +1186,13 @@ lsn of a log record. This can be called when a buffer page has just been
read in, or also for a page already in the buffer pool. */
read in, or also for a page already in the buffer pool. */
UNIV_INTERN
UNIV_INTERN
void
void
recv_recover_page
(
recv_recover_page_func
(
/*==============*/
/*===================*/
ibool
recover_backup
,
#ifndef UNIV_HOTBACKUP
/* in: TRUE if we are recovering a backup
page: then we do not acquire any latches
since the page was read in outside the
buffer pool */
ibool
just_read_in
,
ibool
just_read_in
,
/* in: TRUE if the i/o-handler calls this for
/* in: TRUE if the i/o-handler calls this for
a freshly read page */
a freshly read page */
#endif
/* !UNIV_HOTBACKUP */
buf_block_t
*
block
)
/* in: buffer block */
buf_block_t
*
block
)
/* in: buffer block */
{
{
page_t
*
page
;
page_t
*
page
;
...
@@ -1207,7 +1204,9 @@ recv_recover_page(
...
@@ -1207,7 +1204,9 @@ recv_recover_page(
ib_uint64_t
page_lsn
;
ib_uint64_t
page_lsn
;
ib_uint64_t
page_newest_lsn
;
ib_uint64_t
page_newest_lsn
;
ibool
modification_to_page
;
ibool
modification_to_page
;
#ifndef UNIV_HOTBACKUP
ibool
success
;
ibool
success
;
#endif
/* !UNIV_HOTBACKUP */
mtr_t
mtr
;
mtr_t
mtr
;
mutex_enter
(
&
(
recv_sys
->
mutex
));
mutex_enter
(
&
(
recv_sys
->
mutex
));
...
@@ -1247,15 +1246,14 @@ recv_recover_page(
...
@@ -1247,15 +1246,14 @@ recv_recover_page(
page
=
block
->
frame
;
page
=
block
->
frame
;
if
(
!
recover_backup
)
{
#ifndef UNIV_HOTBACKUP
if
(
just_read_in
)
{
if
(
just_read_in
)
{
/* Move the ownership of the x-latch on the
/* Move the ownership of the x-latch on the page to
page to this OS thread, so that we can acquire
this OS thread, so that we can acquire a second
a second x-latch on it. This is needed for the
x-latch on it. This is needed for the operations to
operations to the page to pass the debug
the page to pass the debug checks. */
checks. */
rw_lock_x_lock_move_ownership
(
&
(
block
->
lock
)
);
rw_lock_x_lock_move_ownership
(
&
block
->
lock
);
}
}
success
=
buf_page_get_known_nowait
(
RW_X_LATCH
,
block
,
success
=
buf_page_get_known_nowait
(
RW_X_LATCH
,
block
,
...
@@ -1265,28 +1263,25 @@ recv_recover_page(
...
@@ -1265,28 +1263,25 @@ recv_recover_page(
ut_a
(
success
);
ut_a
(
success
);
buf_block_dbg_add_level
(
block
,
SYNC_NO_ORDER_CHECK
);
buf_block_dbg_add_level
(
block
,
SYNC_NO_ORDER_CHECK
);
}
#endif
/* !UNIV_HOTBACKUP */
/* Read the newest modification lsn from the page */
/* Read the newest modification lsn from the page */
page_lsn
=
mach_read_ull
(
page
+
FIL_PAGE_LSN
);
page_lsn
=
mach_read_ull
(
page
+
FIL_PAGE_LSN
);
if
(
!
recover_backup
)
{
#ifndef UNIV_HOTBACKUP
/* It may be that the page has been modified in the buffer
/* It may be that the page has been modified in the buffer
pool: read the newest modification lsn there */
pool: read the newest modification lsn there */
page_newest_lsn
page_newest_lsn
=
buf_page_get_newest_modification
(
&
block
->
page
);
=
buf_page_get_newest_modification
(
&
block
->
page
);
if
(
page_newest_lsn
)
{
if
(
page_newest_lsn
)
{
page_lsn
=
page_newest_lsn
;
page_lsn
=
page_newest_lsn
;
}
}
}
else
{
#else
/* !UNIV_HOTBACKUP */
/* In recovery from a backup we do not really use the buffer
/* In recovery from a backup we do not really use the buffer pool */
pool */
page_newest_lsn
=
0
;
page_newest_lsn
=
0
;
}
#endif
/* !UNIV_HOTBACKUP */
modification_to_page
=
FALSE
;
modification_to_page
=
FALSE
;
start_lsn
=
end_lsn
=
0
;
start_lsn
=
end_lsn
=
0
;
...
@@ -1375,11 +1370,13 @@ recv_recover_page(
...
@@ -1375,11 +1370,13 @@ recv_recover_page(
mutex_exit
(
&
(
recv_sys
->
mutex
));
mutex_exit
(
&
(
recv_sys
->
mutex
));
if
(
!
recover_backup
&&
modification_to_page
)
{
#ifndef UNIV_HOTBACKUP
if
(
modification_to_page
)
{
ut_a
(
block
);
ut_a
(
block
);
buf_flush_recv_note_modification
(
block
,
start_lsn
,
end_lsn
);
buf_flush_recv_note_modification
(
block
,
start_lsn
,
end_lsn
);
}
}
#endif
/* !UNIV_HOTBACKUP */
/* Make sure that committing mtr does not change the modification
/* Make sure that committing mtr does not change the modification
lsn values of page */
lsn values of page */
...
@@ -1513,7 +1510,7 @@ recv_apply_hashed_log_recs(
...
@@ -1513,7 +1510,7 @@ recv_apply_hashed_log_recs(
buf_block_dbg_add_level
(
buf_block_dbg_add_level
(
block
,
SYNC_NO_ORDER_CHECK
);
block
,
SYNC_NO_ORDER_CHECK
);
recv_recover_page
(
FALSE
,
FALSE
,
block
);
recv_recover_page
(
FALSE
,
block
);
mtr_commit
(
&
mtr
);
mtr_commit
(
&
mtr
);
}
else
{
}
else
{
recv_read_in_area
(
space
,
zip_size
,
recv_read_in_area
(
space
,
zip_size
,
...
@@ -1693,7 +1690,7 @@ recv_apply_log_recs_for_backup(void)
...
@@ -1693,7 +1690,7 @@ recv_apply_log_recs_for_backup(void)
}
}
/* Apply the log records to this page */
/* Apply the log records to this page */
recv_recover_page
(
TRUE
,
FALSE
,
block
);
recv_recover_page
(
FALSE
,
block
);
/* Write the page back to the tablespace file using the
/* Write the page back to the tablespace file using the
fil0fil.c routines */
fil0fil.c routines */
...
...
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