Commit 6fde0073 authored by Marko Mäkelä's avatar Marko Mäkelä

Rename log_make_checkpoint_at() to log_make_checkpoint()

The function was always called with lsn=LSN_MAX.
Remove that redundant parameter.

Spotted by Thirunarayanan Balathandayuthapani.
parent c65cb244
...@@ -328,7 +328,7 @@ buf_dblwr_create() ...@@ -328,7 +328,7 @@ buf_dblwr_create()
mtr_commit(&mtr); mtr_commit(&mtr);
/* Flush the modified pages to disk and make a checkpoint */ /* Flush the modified pages to disk and make a checkpoint */
log_make_checkpoint_at(LSN_MAX); log_make_checkpoint();
/* Remove doublewrite pages from LRU */ /* Remove doublewrite pages from LRU */
buf_pool_invalidate(); buf_pool_invalidate();
......
...@@ -19075,7 +19075,7 @@ checkpoint_now_set( ...@@ -19075,7 +19075,7 @@ checkpoint_now_set(
+ (log_sys->append_on_checkpoint != NULL + (log_sys->append_on_checkpoint != NULL
? log_sys->append_on_checkpoint->size() : 0) ? log_sys->append_on_checkpoint->size() : 0)
< log_sys->lsn) { < log_sys->lsn) {
log_make_checkpoint_at(LSN_MAX); log_make_checkpoint();
fil_flush_file_spaces(FIL_TYPE_LOG); fil_flush_file_spaces(FIL_TYPE_LOG);
} }
......
...@@ -210,15 +210,13 @@ log_buffer_sync_in_background( ...@@ -210,15 +210,13 @@ log_buffer_sync_in_background(
/** Make a checkpoint. Note that this function does not flush dirty /** Make a checkpoint. Note that this function does not flush dirty
blocks from the buffer pool: it only checks what is lsn of the oldest blocks from the buffer pool: it only checks what is lsn of the oldest
modification in the pool, and writes information about the lsn in modification in the pool, and writes information about the lsn in
log files. Use log_make_checkpoint_at() to flush also the pool. log files. Use log_make_checkpoint() to flush also the pool.
@param[in] sync whether to wait for the write to complete @param[in] sync whether to wait for the write to complete
@return true if success, false if a checkpoint write was already running */ @return true if success, false if a checkpoint write was already running */
bool log_checkpoint(bool sync); bool log_checkpoint(bool sync);
/** Make a checkpoint at or after a specified LSN. /** Make a checkpoint */
@param[in] lsn the log sequence number, or LSN_MAX void log_make_checkpoint();
for the latest LSN */
void log_make_checkpoint_at(lsn_t lsn);
/****************************************************************//** /****************************************************************//**
Makes a checkpoint at the latest lsn and writes it to first page of each Makes a checkpoint at the latest lsn and writes it to first page of each
......
...@@ -656,11 +656,11 @@ do { \ ...@@ -656,11 +656,11 @@ do { \
#ifdef HAVE_PSI_STAGE_INTERFACE #ifdef HAVE_PSI_STAGE_INTERFACE
/** Performance schema stage event for monitoring ALTER TABLE progress /** Performance schema stage event for monitoring ALTER TABLE progress
everything after flush log_make_checkpoint_at(). */ everything after flush log_make_checkpoint(). */
extern PSI_stage_info srv_stage_alter_table_end; extern PSI_stage_info srv_stage_alter_table_end;
/** Performance schema stage event for monitoring ALTER TABLE progress /** Performance schema stage event for monitoring ALTER TABLE progress
log_make_checkpoint_at(). */ log_make_checkpoint(). */
extern PSI_stage_info srv_stage_alter_table_flush; extern PSI_stage_info srv_stage_alter_table_flush;
/** Performance schema stage event for monitoring ALTER TABLE progress /** Performance schema stage event for monitoring ALTER TABLE progress
......
...@@ -1553,7 +1553,7 @@ log_append_on_checkpoint( ...@@ -1553,7 +1553,7 @@ log_append_on_checkpoint(
/** Make a checkpoint. Note that this function does not flush dirty /** Make a checkpoint. Note that this function does not flush dirty
blocks from the buffer pool: it only checks what is lsn of the oldest blocks from the buffer pool: it only checks what is lsn of the oldest
modification in the pool, and writes information about the lsn in modification in the pool, and writes information about the lsn in
log files. Use log_make_checkpoint_at() to flush also the pool. log files. Use log_make_checkpoint() to flush also the pool.
@param[in] sync whether to wait for the write to complete @param[in] sync whether to wait for the write to complete
@return true if success, false if a checkpoint write was already running */ @return true if success, false if a checkpoint write was already running */
bool log_checkpoint(bool sync) bool log_checkpoint(bool sync)
...@@ -1667,14 +1667,12 @@ bool log_checkpoint(bool sync) ...@@ -1667,14 +1667,12 @@ bool log_checkpoint(bool sync)
return(true); return(true);
} }
/** Make a checkpoint at or after a specified LSN. /** Make a checkpoint */
@param[in] lsn the log sequence number, or LSN_MAX void log_make_checkpoint()
for the latest LSN */
void log_make_checkpoint_at(lsn_t lsn)
{ {
/* Preflush pages synchronously */ /* Preflush pages synchronously */
while (!log_preflush_pool_modified_pages(lsn)) { while (!log_preflush_pool_modified_pages(LSN_MAX)) {
/* Flush as much as we can */ /* Flush as much as we can */
} }
...@@ -2010,7 +2008,7 @@ logs_empty_and_mark_files_at_shutdown(void) ...@@ -2010,7 +2008,7 @@ logs_empty_and_mark_files_at_shutdown(void)
if (!srv_read_only_mode) { if (!srv_read_only_mode) {
service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL, service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL,
"ensuring dirty buffer pool are written to log"); "ensuring dirty buffer pool are written to log");
log_make_checkpoint_at(LSN_MAX); log_make_checkpoint();
log_mutex_enter(); log_mutex_enter();
......
...@@ -2090,7 +2090,7 @@ row_import_cleanup( ...@@ -2090,7 +2090,7 @@ row_import_cleanup(
DBUG_EXECUTE_IF("ib_import_before_checkpoint_crash", DBUG_SUICIDE();); DBUG_EXECUTE_IF("ib_import_before_checkpoint_crash", DBUG_SUICIDE(););
log_make_checkpoint_at(LSN_MAX); log_make_checkpoint();
return(err); return(err);
} }
......
...@@ -2224,7 +2224,7 @@ truncate_t::fixup_tables_in_non_system_tablespace() ...@@ -2224,7 +2224,7 @@ truncate_t::fixup_tables_in_non_system_tablespace()
if (err == DB_SUCCESS && s_tables.size() > 0) { if (err == DB_SUCCESS && s_tables.size() > 0) {
log_make_checkpoint_at(LSN_MAX); log_make_checkpoint();
} }
for (ulint i = 0; i < s_tables.size(); ++i) { for (ulint i = 0; i < s_tables.size(); ++i) {
......
...@@ -669,12 +669,12 @@ static const ulint SRV_MASTER_SLOT = 0; ...@@ -669,12 +669,12 @@ static const ulint SRV_MASTER_SLOT = 0;
#ifdef HAVE_PSI_STAGE_INTERFACE #ifdef HAVE_PSI_STAGE_INTERFACE
/** Performance schema stage event for monitoring ALTER TABLE progress /** Performance schema stage event for monitoring ALTER TABLE progress
everything after flush log_make_checkpoint_at(). */ everything after flush log_make_checkpoint(). */
PSI_stage_info srv_stage_alter_table_end PSI_stage_info srv_stage_alter_table_end
= {0, "alter table (end)", PSI_FLAG_STAGE_PROGRESS}; = {0, "alter table (end)", PSI_FLAG_STAGE_PROGRESS};
/** Performance schema stage event for monitoring ALTER TABLE progress /** Performance schema stage event for monitoring ALTER TABLE progress
log_make_checkpoint_at(). */ log_make_checkpoint(). */
PSI_stage_info srv_stage_alter_table_flush PSI_stage_info srv_stage_alter_table_flush
= {0, "alter table (flush)", PSI_FLAG_STAGE_PROGRESS}; = {0, "alter table (flush)", PSI_FLAG_STAGE_PROGRESS};
......
...@@ -516,7 +516,7 @@ create_log_files( ...@@ -516,7 +516,7 @@ create_log_files(
(log_sys->lsn - log_sys->last_checkpoint_lsn)); (log_sys->lsn - log_sys->last_checkpoint_lsn));
log_mutex_exit(); log_mutex_exit();
log_make_checkpoint_at(LSN_MAX); log_make_checkpoint();
return(DB_SUCCESS); return(DB_SUCCESS);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment