MySQL 9.0.0
Source Code Documentation
buf0flu.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 1995, 2024, Oracle and/or its affiliates.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License, version 2.0, as published by the
7Free Software Foundation.
8
9This program is designed to work with certain software (including
10but not limited to OpenSSL) that is licensed under separate terms,
11as designated in a particular file or component or in included license
12documentation. The authors of MySQL hereby grant you an additional
13permission to link the program and your derivative works with the
14separately licensed software that they have either included with
15the program or referenced in the documentation.
16
17This program is distributed in the hope that it will be useful, but WITHOUT
18ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20for more details.
21
22You should have received a copy of the GNU General Public License along with
23this program; if not, write to the Free Software Foundation, Inc.,
2451 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26*****************************************************************************/
27
28/** @file include/buf0flu.h
29 The database buffer pool flush algorithm
30
31 Created 11/5/1995 Heikki Tuuri
32 *******************************************************/
33
34#ifndef buf0flu_h
35#define buf0flu_h
36
37#include "buf0types.h"
38#include "log0types.h"
39#include "univ.i"
40#include "ut0byte.h"
41#include "ut0cpu_cache.h"
42#include "ut0link_buf.h"
43
44#include <memory>
45#ifndef UNIV_HOTBACKUP
46/** Checks if the page_cleaner is in active state. */
48
49#ifdef UNIV_DEBUG
50
51/** Value of MySQL global variable used to disable page cleaner. */
53
54#endif /* UNIV_DEBUG */
55
56/** Event to synchronise with the flushing. */
58
59/** Event to wait for one flushing step */
61
62class Alter_stage;
63
64/** Remove a block from the flush list of modified blocks.
65@param[in] bpage pointer to the block in question */
66void buf_flush_remove(buf_page_t *bpage);
67
68/** Relocates a buffer control block on the flush_list.
69 Note that it is assumed that the contents of bpage has already been
70 copied to dpage. */
72 buf_page_t *bpage, /*!< in/out: control block being moved */
73 buf_page_t *dpage); /*!< in/out: destination block */
74
75/** Updates the flush system data structures when a write is completed.
76@param[in] bpage pointer to the block in question */
78
79#endif /* !UNIV_HOTBACKUP */
80
81/** Check if page type is uncompressed.
82@param[in] page page frame
83@return true if uncompressed page type. */
84bool page_is_uncompressed_type(const byte *page);
85
86/** Initialize a page for writing to the tablespace.
87@param[in] block buffer block; NULL if bypassing the buffer pool
88@param[in,out] page page frame
89@param[in,out] page_zip_ compressed page, or NULL if uncompressed
90@param[in] newest_lsn newest modification LSN to the page
91@param[in] skip_checksum whether to disable the page checksum
92@param[in] skip_lsn_check true to skip check for LSN (in DEBUG) */
93void buf_flush_init_for_writing(const buf_block_t *block, byte *page,
94 void *page_zip_, lsn_t newest_lsn,
95 bool skip_checksum, bool skip_lsn_check);
96
97#ifndef UNIV_HOTBACKUP
98#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
99/** Writes a flushable page asynchronously from the buffer pool to a file.
100NOTE: block and LRU list mutexes must be held upon entering this function, and
101they will be released by this function after flushing. This is loosely based on
102buf_flush_batch() and buf_flush_page().
103@param[in,out] buf_pool buffer pool instance
104@param[in,out] block buffer control block
105@return true if the page was flushed and the mutex released */
106[[nodiscard]] bool buf_flush_page_try(buf_pool_t *buf_pool, buf_block_t *block);
107#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
108
109/** Do flushing batch of a given type.
110NOTE: The calling thread is not allowed to own any latches on pages!
111@param[in,out] buf_pool buffer pool instance
112@param[in] type flush type
113@param[in] min_n wished minimum number of blocks flushed
114(it is not guaranteed that the actual number is that big, though)
115@param[in] lsn_limit in the case BUF_FLUSH_LIST all blocks whose
116oldest_modification is smaller than this should be flushed (if their number
117does not exceed min_n), otherwise ignored
118@param[out] n_processed the number of pages which were processed is
119passed back to caller. Ignored if NULL
120@retval true if a batch was queued successfully.
121@retval false if another batch of same type was already running. */
122bool buf_flush_do_batch(buf_pool_t *buf_pool, buf_flush_t type, ulint min_n,
123 lsn_t lsn_limit, ulint *n_processed);
124
125/** This utility flushes dirty blocks from the end of the flush list of all
126buffer pool instances.
127NOTE: The calling thread is not allowed to own any latches on pages!
128@param[in] min_n wished minimum number of blocks flushed (it is
129not guaranteed that the actual number is that big, though)
130@param[in] lsn_limit in the case BUF_FLUSH_LIST all blocks whose
131oldest_modification is smaller than this should be flushed (if their number
132does not exceed min_n), otherwise ignored
133@param[out] n_processed the number of pages which were processed is
134passed back to caller. Ignored if NULL.
135@return true if a batch was queued successfully for each buffer pool
136instance. false if another batch of same type was already running in
137at least one of the buffer pool instance */
138bool buf_flush_lists(ulint min_n, lsn_t lsn_limit, ulint *n_processed);
139
140/** This function picks up a single page from the tail of the LRU
141list, flushes it (if it is dirty), removes it from page_hash and LRU
142list and puts it on the free list. It is called from user threads when
143they are unable to find a replaceable page at the tail of the LRU
144list i.e.: when the background LRU flushing in the page_cleaner thread
145is not fast enough to keep pace with the workload.
146@param[in,out] buf_pool buffer pool instance
147@return true if success. */
149
150/** Waits until there's no flush of the given type from given BP instance.
151Note that in case of BUF_FLUSH_LIST and BUF_FLUSH_LRU we also make sure there's
152no ongoing batch initialization (which could lead to flushes).
153The BUF_FLUSH_SINGLE_PAGE does not have batch initialization.
154Note, that we return as soon as there is no flush, but in general a new one
155could start right after we've returned (it's up to the caller to prevent this).
156If buf_pool is nullptr, then it will await a moment with no flushes for each
157BP instance in turn, which in general doesn't imply there was a single moment
158when all instances were quiescent - it's up to the caller to ensure that.
159
160@param[in] buf_pool
161 The specific buffer pool instance to check.
162 Can be null, if we want to wait for each buf_pool in turn.
163@param[in] flush_type Flush type. */
165
166/** This function should be called at a mini-transaction commit, if a page was
167modified in it. Puts the block to the list of modified blocks, if it not
168already in it.
169@param[in] block block which is modified
170@param[in] start_lsn start lsn of the first mtr in a set of mtr's
171@param[in] end_lsn end lsn of the last mtr in the set of mtr's
172@param[in] observer flush observer */
173static inline void buf_flush_note_modification(buf_block_t *block,
174 lsn_t start_lsn, lsn_t end_lsn,
175 Flush_observer *observer);
176
177/** This function should be called when recovery has modified a buffer page.
178@param[in] block block which is modified
179@param[in] start_lsn start lsn of the first mtr in a set of mtr's
180@param[in] end_lsn end lsn of the last mtr in the set of mtr's */
182 lsn_t start_lsn,
183 lsn_t end_lsn);
184
185/** Returns true if the file page block is immediately suitable for replacement,
186i.e., the transition FILE_PAGE => NOT_USED allowed. The caller must hold the
187LRU list and block mutexes.
188@param[in] bpage buffer control block, must be buf_page_in_file() and
189 in the LRU list
190@return true if can replace immediately */
191bool buf_flush_ready_for_replace(const buf_page_t *bpage);
192
193#ifdef UNIV_DEBUG
194struct SYS_VAR;
195
196/** Disables page cleaner threads (coordinator and workers).
197It's used by: SET GLOBAL innodb_page_cleaner_disabled_debug = 1 (0).
198@param[in] thd thread handle
199@param[in] var pointer to system variable
200@param[out] var_ptr where the formal string goes
201@param[in] save immediate result from check function */
203 void *var_ptr,
204 const void *save);
205#endif /* UNIV_DEBUG */
206
207/** Initialize page_cleaner. */
209
210#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
211/** Validates the flush list.
212 @return true if ok */
213bool buf_flush_validate(buf_pool_t *buf_pool);
214#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
215
216/** Initialize the red-black tree to speed up insertions into the flush_list
217 during recovery process. Should be called at the start of recovery
218 process before any page has been read/written. */
219void buf_flush_init_flush_rbt(void);
220
221/** Frees up the red-black tree. */
222void buf_flush_free_flush_rbt(void);
223
224/** Writes a flushable page asynchronously from the buffer pool to a file.
225NOTE: 1. in simulated aio we must call os_aio_simulated_wake_handler_threads
226after we have posted a batch of writes! 2. buf_page_get_mutex(bpage) must be
227held upon entering this function. The LRU list mutex must be held if flush_type
228== BUF_FLUSH_SINGLE_PAGE. Both mutexes will be released by this function if it
229returns true.
230@param[in] buf_pool buffer pool instance
231@param[in] bpage buffer control block
232@param[in] flush_type type of flush
233@param[in] sync true if sync IO request
234@return true if page was flushed */
235bool buf_flush_page(buf_pool_t *buf_pool, buf_page_t *bpage,
236 buf_flush_t flush_type, bool sync);
237
238/** Check if the block is modified and ready for flushing.
239Requires buf_page_get_mutex(bpage).
240@param[in] bpage buffer control block, must be buf_page_in_file()
241@param[in] flush_type type of flush
242@return true if can flush immediately */
243[[nodiscard]] bool buf_flush_ready_for_flush(buf_page_t *bpage,
245
246/** Check if there are any dirty pages that belong to a space id in the flush
247 list in a particular buffer pool.
248 @return number of dirty pages present in a single buffer pool */
250 buf_pool_t *buf_pool, /*!< in: buffer pool */
251 space_id_t id, /*!< in: space id to check */
252 Flush_observer *observer); /*!< in: flush observer to check */
253
254/** Executes fsync for all tablespaces, to fsync all pages written to disk. */
255void buf_flush_fsync();
256
257/** Synchronously flush dirty blocks from the end of the flush list of all
258 buffer pool instances. NOTE: The calling thread is not allowed to own any
259 latches on pages! */
261
262/** Checks if all flush lists are empty. It is supposed to be used in
263single thread, during startup or shutdown. Hence it does not acquire
264lock and it is caller's responsibility to guarantee that flush lists
265are not changed in background.
266@return true if all flush lists were empty. */
268
269/** We use Flush_observer to track flushing of non-redo logged pages in bulk
270create index(btr0load.cc).Since we disable redo logging during a index build,
271we need to make sure that all dirty pages modified by the index build are
272flushed to disk before any redo logged operations go to the index. */
273
275 public:
276 /** Constructor
277 @param[in] space_id table space id
278 @param[in] trx trx instance
279 @param[in,out] stage PFS progress monitoring instance, it's used by
280 ALTER TABLE. It is passed to log_preflush_pool_modified_pages() for
281 accounting. */
282 Flush_observer(space_id_t space_id, trx_t *trx, Alter_stage *stage) noexcept;
283
284 /** Destructor */
285 ~Flush_observer() noexcept;
286
287 /** Print information about the current object.
288 @param[in,out] out output stream to be used.
289 @return the output stream. */
290 std::ostream &print(std::ostream &out) const;
291
292 /** Check pages have been flushed and removed from the flush list
293 in a buffer pool instance.
294 @param[in] instance_no buffer pool instance no
295 @return true if the pages were removed from the flush list */
296 bool is_complete(size_t instance_no) {
297 ut_ad(m_flushed[instance_no].load() >= 0);
298 ut_ad(m_removed[instance_no].load() >= 0);
299 return m_interrupted ||
300 (m_flushed[instance_no].load() == m_removed[instance_no].load());
301 }
302
303 /** Interrupt observer not to wait. */
304 void interrupted() { m_interrupted = true; }
305
306 /** Check whether trx is interrupted
307 @return true if trx is interrupted */
308 bool check_interrupted();
309
310 /** Flush dirty pages. */
311 void flush();
312
313 /** Notify observer of flushing a page
314 @param[in] buf_pool buffer pool instance
315 @param[in] bpage buffer page to flush */
316 void notify_flush(buf_pool_t *buf_pool, buf_page_t *bpage);
317
318 /** Notify observer of removing a page from flush list
319 @param[in] buf_pool buffer pool instance
320 @param[in] bpage buffer page flushed */
321 void notify_remove(buf_pool_t *buf_pool, buf_page_t *bpage);
322
323 private:
324 using Counter = std::atomic_int;
325 using Counters = std::vector<Counter, ut::allocator<Counter>>;
326
327#ifdef UNIV_DEBUG
328 [[nodiscard]] bool validate() const noexcept;
329#endif /* UNIV_DEBUG */
330
331 /** Tablespace ID. */
333
334 /** Trx instance */
336
337 /** Performance schema accounting object, used by ALTER TABLE.
338 If not nullptr, then stage->begin_phase_flush() will be called initially,
339 specifying the number of pages to be attempted to be flushed and
340 subsequently, stage->inc() will be called for each page we attempt to
341 flush. */
343
344 /** Flush request sent, per buffer pool. */
346
347 /** Flush request finished, per buffer pool. */
349
350 /** Number of pages using this instance. */
352
353 /** True if the operation was interrupted. */
355};
356
357lsn_t get_flush_sync_lsn() noexcept;
358
359// Forward declaration.
361
362// Simplified type alias for the aligned unique_ptr
365 ut::detail::Aligned_deleter<Buf_flush_list_added_lsns>>;
366
367/** Tracks the concurrent executions of adding dirty pages to the flush lists.
368It allows to relax order in which dirty pages have to be added to the flush
369lists and helps in advancing the checkpoint LSN.
370Note : Earlier it was known as recent_closed buffer. */
372 public:
373 /** Factory method that creates a dynamically allocated instance that is
374 aligned to the cache line boundary. This is needed since C++17 doesn't
375 guarantee allocating aligned types dynamically */
377
378 /** Validates using assertions that the specified LSN range is not yet added
379 to the flush lists.
380 @param[in] begin start LSN of the range
381 @param[in] end end LSN of the range*/
382 void validate_not_added(lsn_t begin, lsn_t end);
383
384 /** Assume that the start_lsn is the start lsn of the first mini-transaction,
385 for which report_added(mtr.start_lsn, mtr.end_lsn) was not yet called.
386 Before the call smallest_not_added_lsn() can't be larger than start_lsn.
387 During the call smallest_not_added_lsn() becomes start_lsn.
388 @param[in] start_lsn LSNs that are already flushed.*/
389 void assume_added_up_to(lsn_t start_lsn);
390
391 /** Used to report that we know that all changes in a specified range of lsns
392 were already applied to pages in BP and all these pages were already added to
393 corresponding flush lists. The committing mtr should use this function to
394 report that it has added all the pages that it has dirtied to corresponding
395 flush lists already.
396 The newest_modification should be the mtr->commit_lsn().
397 The oldest_modification should be the start_lsn assigned to the mtr
398 (which equals commit_lsn() of the previous mtr).
399
400 Information from these reports is used by smallest_not_added_lsn() to
401 establish the smallest not yet reported lsn, which in turn can be used by page
402 cleaners, or other mtrs which are currently waiting for their turn in
403 wait_to_add().
404 @param[in] oldest_modification start lsn of the range
405 @param[in] newest_modification end lsn fo the range */
406 void report_added(lsn_t oldest_modification, lsn_t newest_modification);
407
408 /** The flush lists are not completely sorted, and the amount of disorder is
409 limited by the order_lag() - which is controlled by immutable
410 srv_buf_flush_list_added_size sysvar - in the following way. If page A is
411 added before page B in a flush_list, then it must hold that
412 A.oldest_modification returned value < B.oldest_modification.
413 @return the maximum lsn distance the subsequent elements of the flush list can
414 lag behind the first element w.r.t. oldest_modification */
415 uint64_t order_lag();
416
417 /** Return lsn up to which we know that all dirty pages with smaller
418 oldest_modification were added to the flush list.
419 @return The smallest lsn for which there was no call to assume_added_up_to(y)
420 with lsn<y nor to report_added(x,y) with x<=lsn<y yet */
421 lsn_t smallest_not_added_lsn();
422
423 /** Wait until it is safe to add dirty pages with a given oldest_modification
424 lsn to flush list without exceeding the disorder limit imposed by older_lag().
425 This function will block and wait until all the pages having
426 page.oldest_modification smaller than oldest_modification - older_lag() are
427 reported to be added to flush list by other threads.
428 @param[in] oldest_modification Oldest LSN that does not violate the
429 order_lag() */
430 void wait_to_add(lsn_t oldest_modification);
431
432 private:
433 /** Ring buffer that keeps track of the ranges of LSNs added to
434 flush_list(s) already.*/
436
437 /** Constructor. Clients must use factory method to create an instance */
439
440 template <typename T, typename... Args>
442 std::size_t alignment, Args &&... args);
443};
444
446#endif /* !UNIV_HOTBACKUP */
447
448#include "buf0flu.ic"
449
450#endif
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:47
Buf_flush_list_added_lsns_aligned_ptr buf_flush_list_added
Tracks adding dirty pages to the flush list.
Definition: buf0buf.cc:330
void buf_flush_fsync()
Executes fsync for all tablespaces, to fsync all pages written to disk.
Definition: buf0flu.cc:3567
std::unique_ptr< Buf_flush_list_added_lsns, ut::detail::Aligned_deleter< Buf_flush_list_added_lsns > > Buf_flush_list_added_lsns_aligned_ptr
Definition: buf0flu.h:365
ulint buf_pool_get_dirty_pages_count(buf_pool_t *buf_pool, space_id_t id, Flush_observer *observer)
Check if there are any dirty pages that belong to a space id in the flush list in a particular buffer...
Definition: buf0flu.cc:3699
void buf_flush_write_complete(buf_page_t *bpage)
Updates the flush system data structures when a write is completed.
Definition: buf0flu.cc:914
bool buf_flush_do_batch(buf_pool_t *buf_pool, buf_flush_t type, ulint min_n, lsn_t lsn_limit, ulint *n_processed)
Do flushing batch of a given type.
Definition: buf0flu.cc:2033
void buf_flush_sync_all_buf_pools()
Synchronously flush dirty blocks from the end of the flush list of all buffer pool instances.
Definition: buf0flu.cc:3595
bool buf_flush_single_page_from_LRU(buf_pool_t *buf_pool)
This function picks up a single page from the tail of the LRU list, flushes it (if it is dirty),...
Definition: buf0flu.cc:2118
bool buf_flush_validate(buf_pool_t *buf_pool)
Validates the flush list.
Definition: buf0flu.cc:3685
void buf_flush_init_flush_rbt(void)
Initialize the red-black tree to speed up insertions into the flush_list during recovery process.
Definition: buf0flu.cc:367
bool buf_flush_lists(ulint min_n, lsn_t lsn_limit, ulint *n_processed)
This utility flushes dirty blocks from the end of the flush list of all buffer pool instances.
Definition: buf0flu.cc:2056
static void buf_flush_recv_note_modification(buf_block_t *block, lsn_t start_lsn, lsn_t end_lsn)
This function should be called when recovery has modified a buffer page.
void buf_flush_page_cleaner_disabled_debug_update(THD *thd, SYS_VAR *var, void *var_ptr, const void *save)
Disables page cleaner threads (coordinator and workers).
Definition: buf0flu.cc:3059
bool buf_flush_page(buf_pool_t *buf_pool, buf_page_t *bpage, buf_flush_t flush_type, bool sync)
Writes a flushable page asynchronously from the buffer pool to a file.
Definition: buf0flu.cc:1273
void buf_flush_remove(buf_page_t *bpage)
Remove a block from the flush list of modified blocks.
Definition: buf0flu.cc:781
os_event_t buf_flush_tick_event
Event to wait for one flushing step.
Definition: buf0flu.cc:102
bool buf_flush_page_try(buf_pool_t *buf_pool, buf_block_t *block)
Writes a flushable page asynchronously from the buffer pool to a file.
Definition: buf0flu.cc:1399
os_event_t buf_flush_event
Event to synchronise with the flushing.
Definition: buf0flu.cc:99
void buf_flush_await_no_flushing(buf_pool_t *buf_pool, buf_flush_t flush_type)
Waits until there's no flush of the given type from given BP instance.
Definition: buf0flu.cc:2021
static void buf_flush_note_modification(buf_block_t *block, lsn_t start_lsn, lsn_t end_lsn, Flush_observer *observer)
This function should be called at a mini-transaction commit, if a page was modified in it.
void buf_flush_free_flush_rbt(void)
Frees up the red-black tree.
Definition: buf0flu.cc:387
void buf_flush_relocate_on_flush_list(buf_page_t *bpage, buf_page_t *dpage)
Relocates a buffer control block on the flush_list.
Definition: buf0flu.cc:857
void buf_flush_page_cleaner_init()
Initialize page_cleaner.
Definition: buf0flu.cc:2769
lsn_t get_flush_sync_lsn() noexcept
Get the lsn up to which data pages are to be synchronously flushed.
Definition: buf0flu.cc:90
bool buf_are_flush_lists_empty_validate()
Checks if all flush lists are empty.
Definition: buf0flu.cc:408
bool buf_flush_ready_for_replace(const buf_page_t *bpage)
Returns true if the file page block is immediately suitable for replacement, i.e.,...
Definition: buf0flu.cc:682
bool innodb_page_cleaner_disabled_debug
Value of MySQL global variable used to disable page cleaner.
Definition: buf0flu.cc:200
bool buf_flush_ready_for_flush(buf_page_t *bpage, buf_flush_t flush_type)
Check if the block is modified and ready for flushing.
Definition: buf0flu.cc:775
void buf_flush_init_for_writing(const buf_block_t *block, byte *page, void *page_zip_, lsn_t newest_lsn, bool skip_checksum, bool skip_lsn_check)
Initialize a page for writing to the tablespace.
Definition: buf0flu.cc:985
bool buf_flush_page_cleaner_is_active()
Checks if the page_cleaner is in active state.
Definition: buf0flu.cc:2765
bool page_is_uncompressed_type(const byte *page)
Check if page type is uncompressed.
Definition: buf0flu.cc:961
The database buffer pool flush algorithm.
The database buffer pool global types for the directory.
buf_flush_t
Flags for flush types.
Definition: buf0types.h:68
Class used to report ALTER TABLE progress via performance_schema.
Definition: ut0stage.h:81
Tracks the concurrent executions of adding dirty pages to the flush lists.
Definition: buf0flu.h:371
We use Flush_observer to track flushing of non-redo logged pages in bulk create index(btr0load....
Definition: buf0flu.h:274
trx_t * m_trx
Trx instance.
Definition: buf0flu.h:335
Counters m_flushed
Flush request sent, per buffer pool.
Definition: buf0flu.h:345
space_id_t m_space_id
Tablespace ID.
Definition: buf0flu.h:332
Flush_observer(space_id_t space_id, trx_t *trx, Alter_stage *stage) noexcept
Constructor.
Definition: buf0flu.cc:3746
void flush()
Flush dirty pages.
Definition: buf0flu.cc:3802
Counters m_removed
Flush request finished, per buffer pool.
Definition: buf0flu.h:348
bool validate() const noexcept
Definition: buf0flu.cc:3838
void interrupted()
Interrupt observer not to wait.
Definition: buf0flu.h:304
std::ostream & print(std::ostream &out) const
Print information about the current object.
Definition: buf0flu.cc:3847
bool check_interrupted()
Check whether trx is interrupted.
Definition: buf0flu.cc:3776
~Flush_observer() noexcept
Destructor.
Definition: buf0flu.cc:3765
void notify_remove(buf_pool_t *buf_pool, buf_page_t *bpage)
Notify observer of removing a page from flush list.
Definition: buf0flu.cc:3796
bool m_interrupted
True if the operation was interrupted.
Definition: buf0flu.h:354
void notify_flush(buf_pool_t *buf_pool, buf_page_t *bpage)
Notify observer of flushing a page.
Definition: buf0flu.cc:3786
std::vector< Counter, ut::allocator< Counter > > Counters
Definition: buf0flu.h:325
Counter m_n_ref_count
Number of pages using this instance.
Definition: buf0flu.h:351
Alter_stage * m_stage
Performance schema accounting object, used by ALTER TABLE.
Definition: buf0flu.h:342
bool is_complete(size_t instance_no)
Check pages have been flushed and removed from the flush list in a buffer pool instance.
Definition: buf0flu.h:296
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: buf0buf.h:1153
int page
Definition: ctype-mb.cc:1224
flush_type
Definition: my_sys.h:297
Redo log basic types.
uint64_t lsn_t
Type used for all log sequence number storage and arithmetic.
Definition: log0types.h:63
Sharded atomic counter.
Definition: ut0counter.h:221
bool load(THD *, const dd::String_type &fname, dd::String_type *buf)
Read an sdi file from disk and store in a buffer.
Definition: sdi_file.cc:308
Definition: ut0tuple.h:57
static mysql_service_status_t create(my_h_string *) noexcept
Definition: mysql_string_all_empty.cc:43
const char * begin(const char *const c)
Definition: base64.h:44
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
Definition: gcs_xcom_synode.h:64
This file contains a set of libraries providing overloads for regular dynamic allocation routines whi...
Definition: aligned_alloc.h:48
constexpr size_t INNODB_CACHE_LINE_SIZE
CPU cache line size.
Definition: ut0cpu_cache.h:41
T * aligned_new_withkey(PSI_memory_key_t key, std::size_t alignment, Args &&... args)
Dynamically allocates storage for an object of type T at address aligned to the requested alignment.
Definition: ut0new.h:1595
std::conditional_t< !std::is_array< T >::value, std::unique_ptr< T, detail::Deleter< T > >, std::conditional_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, detail::Array_deleter< std::remove_extent_t< T > > >, void > > unique_ptr
The following is a common type that is returned by all the ut::make_unique (non-aligned) specializati...
Definition: ut0new.h:2439
required string key
Definition: replication_asynchronous_connection_failover.proto:60
required string type
Definition: replication_group_member_actions.proto:34
Definition: plugin.h:69
The buffer control block structure.
Definition: buf0buf.h:1747
The buffer pool structure.
Definition: buf0buf.h:2275
InnoDB condition variable.
Definition: os0event.cc:63
Definition: trx0trx.h:684
Light-weight and type-safe wrapper around the PSI_memory_key that eliminates the possibility of intro...
Definition: ut0new.h:178
Version control for database, common definitions, and include files.
unsigned long int ulint
Definition: univ.i:406
Utilities for byte operations.
Utilities related to CPU cache.
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:105