summaryrefslogtreecommitdiff
path: root/storage/innobase/include
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/include')
-rw-r--r--storage/innobase/include/btr0bulk.h37
-rw-r--r--storage/innobase/include/buf0buf.h2
-rw-r--r--storage/innobase/include/buf0flu.h90
-rw-r--r--storage/innobase/include/buf0flu.ic10
-rw-r--r--storage/innobase/include/buf0lru.h8
-rw-r--r--storage/innobase/include/buf0types.h2
-rw-r--r--storage/innobase/include/fil0fil.h7
-rw-r--r--storage/innobase/include/fsp0fsp.h16
-rw-r--r--storage/innobase/include/mtr0log.ic3
-rw-r--r--storage/innobase/include/mtr0mtr.h15
-rw-r--r--storage/innobase/include/row0merge.h8
-rw-r--r--storage/innobase/include/srv0srv.h6
-rw-r--r--storage/innobase/include/trx0trx.h20
-rw-r--r--storage/innobase/include/ut0stage.h46
14 files changed, 24 insertions, 246 deletions
diff --git a/storage/innobase/include/btr0bulk.h b/storage/innobase/include/btr0bulk.h
index 0bebc8c4c27..12ecddca44f 100644
--- a/storage/innobase/include/btr0bulk.h
+++ b/storage/innobase/include/btr0bulk.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2014, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2019, MariaDB Corporation.
+Copyright (c) 2019, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -53,14 +53,12 @@ public:
@param[in] index B-tree index
@param[in] page_no page number
@param[in] level page level
- @param[in] trx_id transaction id
- @param[in] observer flush observer */
+ @param[in] trx_id transaction id */
PageBulk(
dict_index_t* index,
trx_id_t trx_id,
ulint page_no,
- ulint level,
- FlushObserver* observer)
+ ulint level)
:
m_heap(NULL),
m_index(index),
@@ -81,7 +79,6 @@ public:
m_total_data(0),
#endif /* UNIV_DEBUG */
m_modify_clock(0),
- m_flush_observer(observer),
m_err(DB_SUCCESS)
{
ut_ad(!dict_index_is_spatial(m_index));
@@ -274,9 +271,6 @@ private:
when the block is re-pinned */
ib_uint64_t m_modify_clock;
- /** Flush observer, or NULL if redo logging is enabled */
- FlushObserver* m_flush_observer;
-
/** Operation result DB_SUCCESS or error code */
dberr_t m_err;
};
@@ -289,31 +283,15 @@ class BtrBulk
public:
/** Constructor
@param[in] index B-tree index
- @param[in] trx transaction
- @param[in] observer flush observer */
+ @param[in] trx transaction */
BtrBulk(
dict_index_t* index,
- const trx_t* trx,
- FlushObserver* observer)
+ const trx_t* trx)
:
m_index(index),
- m_trx(trx),
- m_flush_observer(observer)
+ m_trx(trx)
{
ut_ad(!dict_index_is_spatial(index));
-#ifdef UNIV_DEBUG
- if (m_flush_observer)
- m_index->table->space->redo_skipped_count++;
-#endif /* UNIV_DEBUG */
- }
-
- /** Destructor */
- ~BtrBulk()
- {
-#ifdef UNIV_DEBUG
- if (m_flush_observer)
- m_index->table->space->redo_skipped_count--;
-#endif /* UNIV_DEBUG */
}
/** Insert a tuple
@@ -385,9 +363,6 @@ private:
/** Root page level */
ulint m_root_level;
- /** Flush observer, or NULL if redo logging is enabled */
- FlushObserver*const m_flush_observer;
-
/** Page cursor vector for all level */
page_bulk_vector m_page_bulks;
};
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
index 8d0176e8f4e..e5ea24a166f 100644
--- a/storage/innobase/include/buf0buf.h
+++ b/storage/innobase/include/buf0buf.h
@@ -1526,8 +1526,6 @@ public:
== (state == BUF_BLOCK_NOT_USED) */
#endif /* UNIV_DEBUG */
- FlushObserver* flush_observer; /*!< flush observer */
-
lsn_t oldest_modification;
/*!< log sequence number of
the START of the log entry
diff --git a/storage/innobase/include/buf0flu.h b/storage/innobase/include/buf0flu.h
index fa653d41748..fa884725d02 100644
--- a/storage/innobase/include/buf0flu.h
+++ b/storage/innobase/include/buf0flu.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2018, MariaDB Corporation.
+Copyright (c) 2014, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -186,9 +186,8 @@ buf_flush_note_modification(
buf_block_t* block, /*!< in: block which is modified */
lsn_t start_lsn, /*!< in: start lsn of the first mtr in a
set of mtr's */
- lsn_t end_lsn, /*!< in: end lsn of the last mtr in the
+ lsn_t end_lsn); /*!< in: end lsn of the last mtr in the
set of mtr's */
- FlushObserver* observer); /*!< in: flush observer */
/********************************************************************//**
Returns TRUE if the file page block is immediately suitable for replacement,
i.e., transition FILE_PAGE => NOT_USED allowed.
@@ -297,8 +296,7 @@ ulint
buf_pool_get_dirty_pages_count(
/*===========================*/
buf_pool_t* buf_pool, /*!< in: buffer pool */
- ulint id, /*!< in: space id to check */
- FlushObserver* observer); /*!< in: flush observer to check */
+ ulint id); /*!< in: space id to check */
/*******************************************************************//**
Synchronously flush dirty blocks from the end of the flush list of all buffer
@@ -314,88 +312,6 @@ void
buf_flush_request_force(
lsn_t lsn_limit);
-/** We use FlushObserver to track flushing of non-redo logged pages in bulk
-create index(BtrBulk.cc).Since we disable redo logging during a index build,
-we need to make sure that all dirty pages modifed by the index build are
-flushed to disk before any redo logged operations go to the index. */
-
-class FlushObserver {
-public:
- /** Constructor
- @param[in,out] space tablespace
- @param[in] trx trx instance
- @param[in] stage performance schema accounting object,
- used by ALTER TABLE. It is passed to log_preflush_pool_modified_pages()
- for accounting. */
- FlushObserver(fil_space_t* space, trx_t* trx, ut_stage_alter_t* stage);
-
- /** Deconstructor */
- ~FlushObserver();
-
- /** Check pages have been flushed and removed from the flush list
- in a buffer pool instance.
- @param[in] instance_no buffer pool instance no
- @return true if the pages were removed from the flush list */
- bool is_complete(ulint instance_no)
- {
- return(m_flushed->at(instance_no) == m_removed->at(instance_no)
- || m_interrupted);
- }
-
- /** @return whether to flush only some pages of the tablespace */
- bool is_partial_flush() const { return m_stage != NULL; }
-
- /** @return whether the operation was interrupted */
- bool is_interrupted() const { return m_interrupted; }
-
- /** Interrupt observer not to wait. */
- void interrupted()
- {
- m_interrupted = true;
- }
-
- /** Check whether the operation has been interrupted */
- void check_interrupted();
-
- /** Flush dirty pages. */
- void flush();
- /** Notify observer of flushing a page
- @param[in] buf_pool buffer pool instance
- @param[in] bpage buffer page to flush */
- void notify_flush(
- buf_pool_t* buf_pool,
- buf_page_t* bpage);
-
- /** Notify observer of removing a page from flush list
- @param[in] buf_pool buffer pool instance
- @param[in] bpage buffer page flushed */
- void notify_remove(
- buf_pool_t* buf_pool,
- buf_page_t* bpage);
-private:
- /** Tablespace */
- fil_space_t* m_space;
-
- /** Trx instance */
- const trx_t* const m_trx;
-
- /** Performance schema accounting object, used by ALTER TABLE.
- If not NULL, then stage->begin_phase_flush() will be called initially,
- specifying the number of pages to be attempted to be flushed and
- subsequently, stage->inc() will be called for each page we attempt to
- flush. */
- ut_stage_alter_t* m_stage;
-
- /* Flush request sent */
- std::vector<ulint>* m_flushed;
-
- /* Flush request finished */
- std::vector<ulint>* m_removed;
-
- /* True if the operation was interrupted. */
- bool m_interrupted;
-};
-
#include "buf0flu.ic"
#endif
diff --git a/storage/innobase/include/buf0flu.ic b/storage/innobase/include/buf0flu.ic
index 7f6578f3989..3e7c255171e 100644
--- a/storage/innobase/include/buf0flu.ic
+++ b/storage/innobase/include/buf0flu.ic
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -48,9 +49,8 @@ buf_flush_note_modification(
buf_block_t* block, /*!< in: block which is modified */
lsn_t start_lsn, /*!< in: start lsn of the mtr that
modified this block */
- lsn_t end_lsn, /*!< in: end lsn of the mtr that
+ lsn_t end_lsn) /*!< in: end lsn of the mtr that
modified this block */
- FlushObserver* observer) /*!< in: flush observer */
{
mutex_enter(&block->mutex);
ut_ad(!srv_read_only_mode
@@ -67,12 +67,6 @@ buf_flush_note_modification(
+ block->frame);
}
- /* Don't allow to set flush observer from non-null to null,
- or from one observer to another. */
- ut_ad(block->page.flush_observer == NULL
- || block->page.flush_observer == observer);
- block->page.flush_observer = observer;
-
if (block->page.oldest_modification == 0) {
buf_pool_t* buf_pool = buf_pool_from_block(block);
diff --git a/storage/innobase/include/buf0lru.h b/storage/innobase/include/buf0lru.h
index 2468efb193f..2eb483381b4 100644
--- a/storage/innobase/include/buf0lru.h
+++ b/storage/innobase/include/buf0lru.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 2017, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -63,11 +63,9 @@ bool buf_LRU_drop_page_hash_for_tablespace(dict_table_t* table)
/** Empty the flush list for all pages belonging to a tablespace.
@param[in] id tablespace identifier
-@param[in,out] observer flush observer,
- or NULL if nothing is to be written
+@param[in] flush whether to write the pages to files
@param[in] first first page to be flushed or evicted */
-void buf_LRU_flush_or_remove_pages(ulint id, FlushObserver* observer,
- ulint first = 0);
+void buf_LRU_flush_or_remove_pages(ulint id, bool flush, ulint first = 0);
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/********************************************************************//**
diff --git a/storage/innobase/include/buf0types.h b/storage/innobase/include/buf0types.h
index 7a54b4d27c1..8570b87b67a 100644
--- a/storage/innobase/include/buf0types.h
+++ b/storage/innobase/include/buf0types.h
@@ -44,8 +44,6 @@ struct buf_pool_stat_t;
struct buf_buddy_stat_t;
/** Doublewrite memory struct */
struct buf_dblwr_t;
-/** Flush observer for bulk create index */
-class FlushObserver;
/** A buffer frame. @see page_t */
typedef byte buf_frame_t;
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
index 88a38bb7f28..44313e652c7 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -42,8 +42,6 @@ Created 10/25/1995 Heikki Tuuri
struct unflushed_spaces_tag_t;
struct rotation_list_tag_t;
-/** whether to reduce redo logging during ALTER TABLE */
-extern my_bool innodb_log_optimize_ddl;
// Forward declaration
extern my_bool srv_use_doublewrite_buf;
extern struct buf_dblwr_t* buf_dblwr;
@@ -114,11 +112,6 @@ struct fil_space_t
bool stop_new_ops;
/** whether undo tablespace truncation is in progress */
bool is_being_truncated;
-#ifdef UNIV_DEBUG
- /** reference count for operations who want to skip redo log in the
- file space in order to make modify_check() pass. */
- Atomic_counter<ulint> redo_skipped_count;
-#endif
fil_type_t purpose;/*!< purpose */
UT_LIST_BASE_NODE_T(fil_node_t) chain;
/*!< base node for the file chain */
diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h
index 00294cf5fb4..a9331a9e8fe 100644
--- a/storage/innobase/include/fsp0fsp.h
+++ b/storage/innobase/include/fsp0fsp.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2019, MariaDB Corporation.
+Copyright (c) 2013, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -494,7 +494,6 @@ fsp_reserve_free_extents(
@param[in] offset page number
@param[in] ahi whether we may need to drop the adaptive
hash index
-@param[in] log whether to write MLOG_INIT_FREE_PAGE record
@param[in,out] mtr mini-transaction */
void
fseg_free_page_func(
@@ -504,14 +503,13 @@ fseg_free_page_func(
#ifdef BTR_CUR_HASH_ADAPT
bool ahi,
#endif /* BTR_CUR_HASH_ADAPT */
- bool log,
mtr_t* mtr);
#ifdef BTR_CUR_HASH_ADAPT
-# define fseg_free_page(header, space, offset, ahi, log, mtr) \
- fseg_free_page_func(header, space, offset, ahi, log, mtr)
+# define fseg_free_page(header, space, offset, ahi, mtr) \
+ fseg_free_page_func(header, space, offset, ahi, mtr)
#else /* BTR_CUR_HASH_ADAPT */
-# define fseg_free_page(header, space, offset, ahi, log, mtr) \
- fseg_free_page_func(header, space, offset, log, mtr)
+# define fseg_free_page(header, space, offset, ahi, mtr) \
+ fseg_free_page_func(header, space, offset, mtr)
#endif /* BTR_CUR_HASH_ADAPT */
/** Determine whether a page is free.
@param[in,out] space tablespace
@@ -636,9 +634,7 @@ inline void fsp_init_file_page(
block->page.id.space(), block->page.id.page_no(),
log_ptr, mtr);
mlog_close(mtr, log_ptr);
- if (!innodb_log_optimize_ddl) {
- block->page.init_on_flush = true;
- }
+ block->page.init_on_flush = true;
}
}
diff --git a/storage/innobase/include/mtr0log.ic b/storage/innobase/include/mtr0log.ic
index 541be8f7090..75327afab5d 100644
--- a/storage/innobase/include/mtr0log.ic
+++ b/storage/innobase/include/mtr0log.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 2017, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -138,7 +138,6 @@ mlog_write_initial_log_record_low(
|| type == MLOG_FILE_DELETE
|| type == MLOG_FILE_CREATE2
|| type == MLOG_FILE_RENAME2
- || type == MLOG_INDEX_LOAD
|| mtr->is_named_space(space_id));
mach_write_to_1(log_ptr, type);
diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h
index a0935c0db90..5885eefbe80 100644
--- a/storage/innobase/include/mtr0mtr.h
+++ b/storage/innobase/include/mtr0mtr.h
@@ -325,18 +325,6 @@ struct mtr_t {
/** @return true if we are inside the change buffer code */
bool is_inside_ibuf() const { return m_inside_ibuf; }
- /** Get flush observer
- @return flush observer */
- FlushObserver* get_flush_observer() const { return m_flush_observer; }
-
- /** Set flush observer
- @param[in] observer flush observer */
- void set_flush_observer(FlushObserver* observer)
- {
- ut_ad(observer == NULL || m_log_mode == MTR_LOG_NO_REDO);
- m_flush_observer = observer;
- }
-
#ifdef UNIV_DEBUG
/** Check if memo contains the given item.
@param memo memo stack
@@ -527,9 +515,6 @@ private:
/** user tablespace that is being modified by the mini-transaction */
fil_space_t* m_user_space;
- /** page flush observer for innodb_log_optimize_ddl=ON */
- FlushObserver *m_flush_observer;
-
/** LSN at commit time */
lsn_t m_commit_lsn;
};
diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h
index fd9050d0a48..3ba7508911a 100644
--- a/storage/innobase/include/row0merge.h
+++ b/storage/innobase/include/row0merge.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2019, MariaDB Corporation.
+Copyright (c) 2015, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -292,12 +292,6 @@ row_merge_drop_table(
dict_table_t* table) /*!< in: table instance to drop */
MY_ATTRIBUTE((nonnull, warn_unused_result));
-/** Write an MLOG_INDEX_LOAD record to indicate in the redo-log
-that redo-logging of individual index pages was disabled, and
-the flushing of such pages to the data files was completed.
-@param[in] index an index tree on which redo logging was disabled */
-void row_merge_write_redo(const dict_index_t* index);
-
/** Build indexes on a table by reading a clustered index, creating a temporary
file containing index entries, merge sorting these index entries and inserting
sorted index entries to indexes.
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index 0fbbdd19725..daca5e3b3fa 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -3,7 +3,7 @@
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, 2009, Google Inc.
Copyright (c) 2009, Percona Inc.
-Copyright (c) 2013, 2019, MariaDB Corporation.
+Copyright (c) 2013, 2020, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -599,10 +599,6 @@ everything after flush log_make_checkpoint(). */
extern PSI_stage_info srv_stage_alter_table_end;
/** Performance schema stage event for monitoring ALTER TABLE progress
-log_make_checkpoint(). */
-extern PSI_stage_info srv_stage_alter_table_flush;
-
-/** Performance schema stage event for monitoring ALTER TABLE progress
row_merge_insert_index_tuples(). */
extern PSI_stage_info srv_stage_alter_table_insert;
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
index 8d2f580b591..ef47b5d395c 100644
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -41,7 +41,6 @@ Created 3/26/1996 Heikki Tuuri
// Forward declaration
struct mtr_t;
-class FlushObserver;
struct rw_trx_hash_element_t;
/******************************************************************//**
@@ -1044,11 +1043,6 @@ public:
/*------------------------------*/
char* detailed_error; /*!< detailed error message for last
error, or empty. */
-private:
- /** flush observer used to track flushing of non-redo logged pages
- during bulk create index */
- FlushObserver* flush_observer;
-public:
/* Lock wait statistics */
ulint n_rec_lock_waits;
/*!< Number of record lock waits,
@@ -1101,20 +1095,6 @@ public:
return(assign_temp_rseg());
}
- /** Set the innodb_log_optimize_ddl page flush observer
- @param[in,out] space tablespace
- @param[in,out] stage performance_schema accounting */
- void set_flush_observer(fil_space_t* space, ut_stage_alter_t* stage);
-
- /** Remove the flush observer */
- void remove_flush_observer();
-
- /** @return the flush observer */
- FlushObserver* get_flush_observer() const
- {
- return flush_observer;
- }
-
/** Transition to committed state, to release implicit locks. */
inline void commit_state();
diff --git a/storage/innobase/include/ut0stage.h b/storage/innobase/include/ut0stage.h
index 1eb7810a1bb..23ff32a60f9 100644
--- a/storage/innobase/include/ut0stage.h
+++ b/storage/innobase/include/ut0stage.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2014, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -62,9 +62,6 @@ if any new indexes are being added, for each one:
being_phase_log_index()
multiple times:
inc() // once per log-block applied
-begin_phase_flush()
- multiple times:
- inc() // once per page flushed
begin_phase_log_table()
multiple times:
inc() // once per log-block applied
@@ -86,7 +83,6 @@ public:
m_n_pk_recs(0),
m_n_pk_pages(0),
m_n_recs_processed(0),
- m_n_flush_pages(0),
m_cur_phase(NOT_STARTED)
{
}
@@ -134,13 +130,6 @@ public:
void
begin_phase_insert();
- /** Flag the beginning of the flush phase.
- @param[in] n_flush_pages this many pages are going to be
- flushed */
- void
- begin_phase_flush(
- ulint n_flush_pages);
-
/** Flag the beginning of the log index phase. */
void
begin_phase_log_index();
@@ -195,16 +184,12 @@ private:
recs-per-page records. */
ulint m_n_recs_processed;
- /** Number of pages to flush. */
- ulint m_n_flush_pages;
-
/** Current phase. */
enum {
NOT_STARTED = 0,
READ_PK = 1,
SORT = 2,
INSERT = 3,
- FLUSH = 4,
/* JAN: TODO: MySQL 5.7 vrs. MariaDB sql/log.h
LOG_INDEX = 5,
LOG_TABLE = 6, */
@@ -317,8 +302,6 @@ ut_stage_alter_t::inc(ulint)
break;
}
- case FLUSH:
- break;
/* JAN: TODO: MySQL 5.7
case LOG_INDEX:
break;
@@ -387,21 +370,6 @@ ut_stage_alter_t::begin_phase_insert()
change_phase(&srv_stage_alter_table_insert);
}
-/** Flag the beginning of the flush phase.
-@param[in] n_flush_pages this many pages are going to be
-flushed */
-inline
-void
-ut_stage_alter_t::begin_phase_flush(
- ulint n_flush_pages)
-{
- m_n_flush_pages = n_flush_pages;
-
- reestimate();
-
- change_phase(&srv_stage_alter_table_flush);
-}
-
/** Flag the beginning of the log index phase. */
inline
void
@@ -458,20 +426,12 @@ ut_stage_alter_t::reestimate()
? m_n_pk_pages
: m_pk->stat_n_leaf_pages;
- /* If flush phase has not started yet and we do not know how
- many pages are to be flushed, then use a wild guess - the
- number of pages in the PK / 2. */
- if (m_n_flush_pages == 0) {
- m_n_flush_pages = n_pk_pages / 2;
- }
-
ulonglong estimate __attribute__((unused))
= n_pk_pages
* (1 /* read PK */
+ m_n_sort_indexes /* row_merge_buf_sort() inside the
read PK per created index */
+ m_n_sort_indexes * 2 /* sort & insert per created index */)
- + m_n_flush_pages
+ row_log_estimate_work(m_pk);
/* Prevent estimate < completed */
@@ -500,8 +460,6 @@ ut_stage_alter_t::change_phase(
m_cur_phase = SORT;
} else if (new_stage == &srv_stage_alter_table_insert) {
m_cur_phase = INSERT;
- } else if (new_stage == &srv_stage_alter_table_flush) {
- m_cur_phase = FLUSH;
/* JAN: TODO: MySQL 5.7 used LOG_INDEX and LOG_TABLE */
} else if (new_stage == &srv_stage_alter_table_log_index) {
m_cur_phase = LOG_INNODB_INDEX;
@@ -542,8 +500,6 @@ public:
void begin_phase_insert() {}
- void begin_phase_flush(ulint) {}
-
void begin_phase_log_index() {}
void begin_phase_log_table() {}