Commit 2aa1f77e authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-19586: Rename recv_sys.empty() to recv_sys.clear()

In the collections of Standard Template Library,
empty() is a predicate and clear() empties a collection.
Let us rename recv_sys.empty() to recv_sys.clear() to avoid confusion.
parent 00c3a288
...@@ -304,8 +304,8 @@ struct recv_sys_t{ ...@@ -304,8 +304,8 @@ struct recv_sys_t{
byte* body, byte* rec_end, lsn_t lsn, byte* body, byte* rec_end, lsn_t lsn,
lsn_t end_lsn); lsn_t end_lsn);
/** Empty a fully processed set of stored redo log records. */ /** Clear a fully processed set of stored redo log records. */
inline void empty(); inline void clear();
/** Determine whether redo log recovery progress should be reported. /** Determine whether redo log recovery progress should be reported.
@param[in] time the current time @param[in] time the current time
......
...@@ -814,8 +814,8 @@ void recv_sys_t::create() ...@@ -814,8 +814,8 @@ void recv_sys_t::create()
last_stored_lsn = 0; last_stored_lsn = 0;
} }
/** Empty a fully processed set of stored redo log records. */ /** Clear a fully processed set of stored redo log records. */
inline void recv_sys_t::empty() inline void recv_sys_t::clear()
{ {
ut_ad(mutex_own(&mutex)); ut_ad(mutex_own(&mutex));
pages.clear(); pages.clear();
...@@ -2273,7 +2273,7 @@ void recv_apply_hashed_log_recs(bool last_batch) ...@@ -2273,7 +2273,7 @@ void recv_apply_hashed_log_recs(bool last_batch)
recv_sys.apply_log_recs = false; recv_sys.apply_log_recs = false;
recv_sys.apply_batch_on = false; recv_sys.apply_batch_on = false;
recv_sys.empty(); recv_sys.clear();
mutex_exit(&recv_sys.mutex); mutex_exit(&recv_sys.mutex);
} }
...@@ -3119,7 +3119,7 @@ recv_group_scan_log_recs( ...@@ -3119,7 +3119,7 @@ recv_group_scan_log_recs(
mutex_enter(&recv_sys.mutex); mutex_enter(&recv_sys.mutex);
recv_sys.len = 0; recv_sys.len = 0;
recv_sys.recovered_offset = 0; recv_sys.recovered_offset = 0;
recv_sys.empty(); recv_sys.clear();
srv_start_lsn = *contiguous_lsn; srv_start_lsn = *contiguous_lsn;
recv_sys.parse_start_lsn = *contiguous_lsn; recv_sys.parse_start_lsn = *contiguous_lsn;
recv_sys.scanned_lsn = *contiguous_lsn; recv_sys.scanned_lsn = *contiguous_lsn;
......
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