MySQL  8.0.23
Source Code Documentation
srv0srv.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (c) 1995, 2020, Oracle and/or its affiliates.
4 Copyright (c) 2008, 2009, Google Inc.
5 Copyright (c) 2009, Percona Inc.
6 
7 Portions of this file contain modifications contributed and copyrighted by
8 Google, Inc. Those modifications are gratefully acknowledged and are described
9 briefly in the InnoDB documentation. The contributions by Google are
10 incorporated with their permission, and subject to the conditions contained in
11 the file COPYING.Google.
12 
13 Portions of this file contain modifications contributed and copyrighted
14 by Percona Inc.. Those modifications are
15 gratefully acknowledged and are described briefly in the InnoDB
16 documentation. The contributions by Percona Inc. are incorporated with
17 their permission, and subject to the conditions contained in the file
18 COPYING.Percona.
19 
20 This program is free software; you can redistribute it and/or modify it under
21 the terms of the GNU General Public License, version 2.0, as published by the
22 Free Software Foundation.
23 
24 This program is also distributed with certain software (including but not
25 limited to OpenSSL) that is licensed under separate terms, as designated in a
26 particular file or component or in included license documentation. The authors
27 of MySQL hereby grant you an additional permission to link the program and
28 your derivative works with the separately licensed software that they have
29 included with MySQL.
30 
31 This program is distributed in the hope that it will be useful, but WITHOUT
32 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
33 FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
34 for more details.
35 
36 You should have received a copy of the GNU General Public License along with
37 this program; if not, write to the Free Software Foundation, Inc.,
38 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
39 
40 *****************************************************************************/
41 
42 /** @file include/srv0srv.h
43  The server main program
44 
45  Created 10/10/1995 Heikki Tuuri
46  *******************************************************/
47 
48 #ifndef srv0srv_h
49 #define srv0srv_h
50 
51 #include "buf0checksum.h"
52 #include "fil0fil.h"
53 #include "log0types.h"
54 #include "mysql/psi/mysql_stage.h"
55 #include "univ.i"
56 
57 #ifndef UNIV_HOTBACKUP
58 #include "log0ddl.h"
59 #include "os0event.h"
60 #include "os0file.h"
61 #include "os0thread.h"
62 #include "que0types.h"
63 #include "srv0conc.h"
64 #include "trx0types.h"
65 #include "ut0counter.h"
66 
67 #include <future>
68 
69 /* Global counters used inside InnoDB. */
70 struct srv_stats_t {
76 
77  /** Count the amount of data written in total (in bytes) */
79 
80  /** Number of the log write requests done */
82 
83  /** Number of physical writes to the log performed */
85 
86  /** Amount of data written to the log files in bytes */
88 
89  /** Number of writes being done to the log files */
91 
92  /** We increase this counter, when we don't have enough
93  space in the log buffer and have to flush it */
95 
96  /** Count the number of times the doublewrite buffer was flushed */
98 
99  /** Store the number of pages that have been flushed to the
100  doublewrite buffer */
102 
103  /** Store the number of write requests issued */
105 
106  /** Store the number of times when we had to wait for a free page
107  in the buffer pool. It happens when the buffer pool is full and we
108  need to make a flush, in order to be able to read or create a page. */
110 
111  /** Count the number of pages that were written from buffer
112  pool to the disk */
114 
115  /** Number of buffer pool reads that led to the reading of
116  a disk page */
118 
119  /** Number of data read in total (in bytes) */
121 
122  /** Wait time of database locks */
124 
125  /** Number of database lock waits */
127 
128  /** Number of threads currently waiting on database locks */
130 
131  /** Number of rows read. */
133 
134  /** Number of rows updated */
136 
137  /** Number of rows deleted */
139 
140  /** Number of rows inserted */
142 
143  /** Number of system rows read. */
145 
146  /** Number of system rows updated */
148 
149  /** Number of system rows deleted */
151 
152  /** Number of system rows inserted */
154 
155  /** Number of sampled pages read */
157 
158  /** Number of sampled pages skipped */
160 };
161 
162 /** Structure which keeps shared future objects for InnoDB background
163 threads. One should use these objects to check if threads exited. */
164 struct Srv_threads {
165  /** Monitor thread (prints info). */
167 
168  /** Error monitor thread. */
170 
171  /** Redo checkpointer thread. */
173 
174  /** Redo writer thread. */
176 
177  /** Redo flusher thread. */
179 
180  /** Redo write notifier thread. */
182 
183  /** Redo flush notifier thread. */
185 
186  /** Redo log archiver (used by backup). */
188 
189  /** Buffer pool dump thread. */
191 
192  /** Buffer pool resize thread. */
194 
195  /** Dict stats background thread. */
197 
198  /** Thread detecting lock wait timeouts. */
200 
201  /** The master thread. */
203 
204  /** The ts_alter_encrypt thread. */
206 
207  /** Thread doing rollbacks during recovery. */
209 
210  /** Thread writing recovered pages during recovery. */
212 
213  /** Purge coordinator (also being a worker) */
215 
216  /** Number of purge workers and size of array below. */
218 
219  /** Purge workers. Note that the m_purge_workers[0] is the same shared
220  state as m_purge_coordinator. */
222 
223  /** Page cleaner coordinator (also being a worker). */
225 
226  /** Number of page cleaner workers and size of array below. */
228 
229  /** Page cleaner workers. Note that m_page_cleaner_workers[0] is the
230  same shared state as m_page_cleaner_coordinator. */
232 
233  /** Archiver's log archiver (used by Clone). */
235 
236  /** Archiver's page archiver (used by Clone). */
238 
239  /** Thread doing optimization for FTS index. */
241 
242  /** Thread for GTID persistence */
244 
245 #ifdef UNIV_DEBUG
246  /** Used in test scenario to delay threads' cleanup until the pre_dd_shutdown
247  is ended and final plugin's shutdown is started (when plugin is DELETED).
248  Note that you may only delay the shutdown for threads for which there is no
249  waiting procedure used in the pre_dd_shutdown. */
251 #endif /* UNIV_DEBUG */
252 
253  /** When the master thread notices that shutdown has started (by noticing
254  srv_shutdown_state >= SRV_SHUTDOWN_PRE_DD_AND_SYSTEM_TRANSACTIONS), it exits
255  its main loop. Then the master thread proceeds with actions related to tasks:
256  - which it has been responsible for,
257  - and which might depend on DD objects.
258  After finishing them, the master thread sets this event.
259  @remarks We use this event to wait in srv_pre_dd_shutdown before we enter
260  next phase (SRV_SHUTDOWN_PURGE) in which master thread is not allowed to
261  use system transactions or touch DD objects. */
263 };
264 
265 /** Check if given thread is still active. */
266 bool srv_thread_is_active(const IB_thread &thread);
267 
268 /** Check if given thread is cleaned-up and stopped. */
269 bool srv_thread_is_stopped(const IB_thread &thread);
270 
271 /** Delay the thread after it discovered that the shutdown_state
272 is greater or equal to SRV_SHUTDOWN_CLEANUP, before it proceeds
273 with further clean up. This is used in the tests to see if such
274 a possible delay does not have impact on the clean shutdown.
275 @param[in] wait_for_signal wait until shutdown phase starts */
276 void srv_thread_delay_cleanup_if_needed(bool wait_for_signal);
277 
279  int n_cpu;
280  double utime_abs;
281  double stime_abs;
282  double utime_pct;
283  double stime_pct;
284 };
285 
286 /** Structure with state of srv background threads. */
287 extern Srv_threads srv_threads;
288 
289 /** Structure with cpu usage information. */
291 
292 extern Log_DDL *log_ddl;
293 
294 #ifdef INNODB_DD_TABLE
295 extern bool srv_is_upgrade_mode;
296 extern bool srv_downgrade_logs;
297 extern bool srv_upgrade_old_undo_found;
298 #endif /* INNODB_DD_TABLE */
299 
301 
302 extern const char *srv_main_thread_op_info;
303 
304 /* The monitor thread waits on this event. */
306 
307 /* The error monitor thread waits on this event. */
309 
310 /** The buffer pool dump/load thread waits on this event. */
312 
313 /** The buffer pool resize thread waits on this event. */
315 #endif /* !UNIV_HOTBACKUP */
316 
317 /** The buffer pool dump/load file name */
318 #define SRV_BUF_DUMP_FILENAME_DEFAULT "ib_buffer_pool"
320 
321 /** Boolean config knobs that tell InnoDB to dump the buffer pool at shutdown
322 and/or load it during startup. */
325 
326 /* Whether to disable file system cache if it is defined */
327 extern bool srv_disable_sort_file_cache;
328 
329 /** Enable or disable writing of NULLs while extending a tablespace.
330 If this is FALSE, then the server will just allocate the space without
331 actually initializing it with NULLs. If the variable is true, the
332 server will allocate and initialize the space by writing NULLs in it. */
333 extern bool tbsp_extend_and_initialize;
334 
335 /* If the last data file is auto-extended, we add this many pages to it
336 at a time */
337 #define SRV_AUTO_EXTEND_INCREMENT (srv_sys_space.get_autoextend_increment())
338 
339 #ifndef UNIV_HOTBACKUP
340 /** Mutex protecting page_zip_stat_per_index */
341 extern ib_mutex_t page_zip_stat_per_index_mutex;
342 /* Mutex for locking srv_monitor_file. Not created if srv_read_only_mode */
343 extern ib_mutex_t srv_monitor_file_mutex;
344 /* Temporary file for innodb monitor output */
345 extern FILE *srv_monitor_file;
346 /* Mutex for locking srv_misc_tmpfile. Only created if !srv_read_only_mode.
347 This mutex has a very low rank; threads reserving it should not
348 acquire any further latches or sleep before releasing this one. */
349 extern ib_mutex_t srv_misc_tmpfile_mutex;
350 /* Temporary file for miscellanous diagnostic output */
351 extern FILE *srv_misc_tmpfile;
352 #endif /* !UNIV_HOTBACKUP */
353 
354 /* Server parameters which are read from the initfile */
355 
356 extern char *srv_data_home;
357 
358 /** Number of pages per doublewrite thread/segment */
359 extern ulong srv_dblwr_pages;
360 
361 /** Set if InnoDB must operate in read-only mode. We don't do any
362 recovery and open all tables in RO mode instead of RW mode. We don't
363 sync the max trx id to disk either. */
364 extern bool srv_read_only_mode;
365 /** Set if InnoDB operates in read-only mode or innodb-force-recovery
366 is greater than SRV_FORCE_NO_TRX_UNDO. */
367 extern bool high_level_read_only;
368 /** store to its own file each table created by an user; data
369 dictionary tables are in the system tablespace 0 */
370 extern bool srv_file_per_table;
371 /** Sleep delay for threads waiting to enter InnoDB. In micro-seconds. */
372 extern ulong srv_thread_sleep_delay;
373 /** Maximum sleep delay (in micro-seconds), value of 0 disables it.*/
374 extern ulong srv_adaptive_max_sleep_delay;
375 
376 /** Sort buffer size in index creation */
377 extern ulong srv_sort_buf_size;
378 
379 /** Maximum modification log file size for online index creation */
380 extern unsigned long long srv_online_max_size;
381 
382 /** Number of threads to use for parallel reads. */
383 extern ulong srv_parallel_read_threads;
384 
385 /* If this flag is TRUE, then we will use the native aio of the
386 OS (provided we compiled Innobase with it in), otherwise we will
387 use simulated aio we build below with threads.
388 Currently we support native aio on windows and linux */
389 extern bool srv_use_native_aio;
390 extern bool srv_numa_interleave;
391 
392 /* The innodb_directories variable value. This a list of directories
393 deliminated by ';', i.e the FIL_PATH_SEPARATOR. */
394 extern char *srv_innodb_directories;
395 
396 /** Server undo tablespaces directory, can be absolute path. */
397 extern char *srv_undo_dir;
398 
399 /** Number of undo tablespaces to use. */
400 extern ulong srv_undo_tablespaces;
401 
402 /** The number of rollback segments per tablespace */
403 extern ulong srv_rollback_segments;
404 
405 /** Maximum size of undo tablespace. */
406 extern unsigned long long srv_max_undo_tablespace_size;
407 
408 /** Rate at which UNDO records should be purged. */
410 
411 /** Enable or Disable Truncate of UNDO tablespace. */
412 extern bool srv_undo_log_truncate;
413 
414 /** Enable or disable Encrypt of UNDO tablespace. */
415 extern bool srv_undo_log_encrypt;
416 
417 /** Initial size of an UNDO tablespace when it is created new
418 or truncated under low load.
419 page size | FSP_EXTENT_SIZE | Initial Size | Pages
420 ----------+------------------+--------------+-------
421  4 KB | 256 pages = 1 MB | 16 MB | 4096
422  8 KB | 128 pages = 1 MB | 16 MB | 2048
423  16 KB | 64 pages = 1 MB | 16 MB | 1024
424  32 KB | 64 pages = 2 MB | 16 MB | 512
425  64 KB | 64 pages = 4 MB | 16 MB | 256 */
426 #define INITIAL_UNDO_SPACE_SIZE (16 * 1024 * 1024)
427 #define INITIAL_UNDO_SPACE_SIZE_IN_PAGES \
428  static_cast<os_offset_t>(INITIAL_UNDO_SPACE_SIZE / UNIV_PAGE_SIZE)
429 
430 /** Maximum number of recently truncated undo tablespace IDs for
431 the same undo number. */
432 extern const size_t CONCURRENT_UNDO_TRUNCATE_LIMIT;
433 
434 extern char *srv_log_group_home_dir;
435 
436 /** Enable or Disable Encrypt of REDO tablespace. */
437 extern bool srv_redo_log_encrypt;
438 
439 /* Maximum number of redo files of a cloned DB. */
440 #define SRV_N_LOG_FILES_CLONE_MAX 1000
441 
442 /** Maximum number of srv_n_log_files, or innodb_log_files_in_group */
443 #define SRV_N_LOG_FILES_MAX 100
444 extern ulong srv_n_log_files;
445 
446 #ifdef UNIV_DEBUG_DEDICATED
447 extern ulong srv_debug_system_mem_size;
448 #endif /* UNIV_DEBUG_DEDICATED */
449 
450 /** At startup, this is the current redo log file size.
451 During startup, if this is different from srv_log_file_size_requested
452 (innodb_log_file_size), the redo log will be rebuilt and this size
453 will be initialized to srv_log_file_size_requested.
454 When upgrading from a previous redo log format, this will be set to 0,
455 and writing to the redo log is not allowed.
456 
457 During startup, this is in bytes, and later converted to pages. */
459 
460 /** The value of the startup parameter innodb_log_file_size. */
462 
463 /** Space for log buffer, expressed in bytes. Note, that log buffer
464 will use only the largest power of two, which is not greater than
465 the assigned space. */
466 extern ulong srv_log_buffer_size;
467 
468 /** When log writer follows links in the log recent written buffer,
469 it stops when it has reached at least that many bytes to write,
470 limiting how many bytes can be written in single call. */
471 extern ulong srv_log_write_max_size;
472 
473 /** Size of block, used for writing ahead to avoid read-on-write. */
474 extern ulong srv_log_write_ahead_size;
475 
476 /** Number of events used for notifications about redo write. */
477 extern ulong srv_log_write_events;
478 
479 /** Number of events used for notifications about redo flush. */
480 extern ulong srv_log_flush_events;
481 
482 /** Number of slots in a small buffer, which is used to allow concurrent
483 writes to log buffer. The slots are addressed by LSN values modulo number
484 of the slots. */
485 extern ulong srv_log_recent_written_size;
486 
487 /** Number of slots in a small buffer, which is used to break requirement
488 for total order of dirty pages, when they are added to flush lists.
489 The slots are addressed by LSN values modulo number of the slots. */
490 extern ulong srv_log_recent_closed_size;
491 
492 /** Whether to activate/pause the log writer threads. */
493 extern bool srv_log_writer_threads;
494 
495 /** Minimum absolute value of cpu time for which spin-delay is used. */
497 
498 /** Maximum percentage of cpu time for which spin-delay is used. */
500 
501 /** Number of spin iterations, when spinning and waiting for log buffer
502 written up to given LSN, before we fallback to loop with sleeps.
503 This is not used when user thread has to wait for log flushed to disk. */
505 
506 /** Timeout used when waiting for redo write (microseconds). */
507 extern ulong srv_log_wait_for_write_timeout;
508 
509 /** Number of spin iterations, when spinning and waiting for log flushed. */
511 
512 /** Maximum value of average log flush time for which spin-delay is used.
513 When flushing takes longer, user threads no longer spin when waiting for
514 flushed redo. Expressed in microseconds. */
516 
517 /** Timeout used when waiting for redo flush (microseconds). */
518 extern ulong srv_log_wait_for_flush_timeout;
519 
520 /** Number of spin iterations, for which log writer thread is waiting
521 for new data to write or flush without sleeping. */
522 extern ulong srv_log_writer_spin_delay;
523 
524 /** Initial timeout used to wait on writer_event. */
525 extern ulong srv_log_writer_timeout;
526 
527 /** Number of milliseconds every which a periodical checkpoint is written
528 by the log checkpointer thread (unless periodical checkpoints are disabled,
529 which is a case during initial phase of startup). */
530 extern ulong srv_log_checkpoint_every;
531 
532 /** Number of spin iterations, for which log flusher thread is waiting
533 for new data to flush, without sleeping. */
534 extern ulong srv_log_flusher_spin_delay;
535 
536 /** Initial timeout used to wait on flusher_event. */
537 extern ulong srv_log_flusher_timeout;
538 
539 /** Number of spin iterations, for which log write notifier thread is waiting
540 for advanced writeed_to_disk_lsn without sleeping. */
542 
543 /** Initial timeout used to wait on write_notifier_event. */
544 extern ulong srv_log_write_notifier_timeout;
545 
546 /** Number of spin iterations, for which log flush notifier thread is waiting
547 for advanced flushed_to_disk_lsn without sleeping. */
549 
550 /** Initial timeout used to wait on flush_notifier_event. */
551 extern ulong srv_log_flush_notifier_timeout;
552 
553 /** Whether to generate and require checksums on the redo log pages. */
554 extern bool srv_log_checksums;
555 
556 #ifdef UNIV_DEBUG
557 
558 /** If true then disable checkpointing. */
559 extern bool srv_checkpoint_disabled;
560 
561 /* Used to inject a failure to find a free rollback segment. */
563 
564 #endif /* UNIV_DEBUG */
565 
566 extern ulong srv_flush_log_at_trx_commit;
569 extern bool srv_adaptive_flushing;
570 extern bool srv_flush_sync;
571 
572 /* If this flag is TRUE, then we will load the indexes' (and tables') metadata
573 even if they are marked as "corrupted". Mostly it is for DBA to process
574 corrupted index and table */
575 extern bool srv_load_corrupted;
576 
577 /** Dedicated server setting */
578 extern bool srv_dedicated_server;
579 /** Requested size in bytes */
580 extern ulint srv_buf_pool_size;
581 /** Minimum pool size in bytes */
582 extern const ulint srv_buf_pool_min_size;
583 /** Default pool size in bytes */
584 extern const ulint srv_buf_pool_def_size;
585 /** Maximum pool size in bytes */
586 extern const longlong srv_buf_pool_max_size;
587 /** Requested buffer pool chunk size. Each buffer pool instance consists
588 of one or more chunks. */
590 /** Minimum buffer pool chunk size. */
592 /** The buffer pool chunk size must be a multiple of this number. */
594 /** Maximum buffer pool chunk size. */
596 
597 /** Requested number of buffer pool instances */
598 extern ulong srv_buf_pool_instances;
599 /** Default number of buffer pool instances */
600 extern const ulong srv_buf_pool_instances_default;
601 /** Number of locks to protect buf_pool->page_hash */
602 extern ulong srv_n_page_hash_locks;
603 /** Whether to validate InnoDB tablespace paths on startup */
605 /** Scan depth for LRU flush batch i.e.: number of blocks scanned*/
606 extern ulong srv_LRU_scan_depth;
607 /** Whether or not to flush neighbors of a block */
608 extern ulong srv_flush_neighbors;
609 /** Previously requested size. Accesses protected by memory barriers. */
610 extern ulint srv_buf_pool_old_size;
611 /** Current size as scaling factor for the other components */
612 extern ulint srv_buf_pool_base_size;
613 /** Current size in bytes */
614 extern long long srv_buf_pool_curr_size;
615 /** Dump this % of each buffer pool during BP dump */
616 extern ulong srv_buf_pool_dump_pct;
617 /** Lock table size in bytes */
618 extern ulint srv_lock_table_size;
619 
620 extern ulint srv_n_file_io_threads;
621 extern bool srv_random_read_ahead;
622 extern ulong srv_read_ahead_threshold;
623 extern ulong srv_n_read_io_threads;
624 extern ulong srv_n_write_io_threads;
625 
627 
628 /** Default value of srv_idle_flush_pct */
629 extern const ulong srv_idle_flush_pct_default;
630 /** How much flush to be done in case of server is idle */
631 extern ulong srv_idle_flush_pct;
632 
633 /* Number of IO operations per second the server can do */
634 extern ulong srv_io_capacity;
635 
636 /* We use this dummy default value at startup for max_io_capacity.
637 The real value is set based on the value of io_capacity. */
638 #define SRV_MAX_IO_CAPACITY_DUMMY_DEFAULT (~0UL)
639 #define SRV_MAX_IO_CAPACITY_LIMIT (~0UL)
640 extern ulong srv_max_io_capacity;
641 /* Returns the number of IO operations that is X percent of the
642 capacity. PCT_IO(5) -> returns the number of IO operations that
643 is 5% of the max where max is srv_io_capacity. */
644 #define PCT_IO(p) ((ulong)(srv_io_capacity * ((double)(p) / 100.0)))
645 
646 /** Maximum number of purge threads, including the purge coordinator */
647 #define MAX_PURGE_THREADS 32
648 
649 /* The "innodb_stats_method" setting, decides how InnoDB is going
650 to treat NULL value when collecting statistics. It is not defined
651 as enum type because the configure option takes unsigned integer type. */
652 extern ulong srv_innodb_stats_method;
653 
654 extern ulint srv_max_n_open_files;
655 
656 extern ulong srv_n_page_cleaners;
657 
658 extern double srv_max_dirty_pages_pct;
659 extern double srv_max_dirty_pages_pct_lwm;
660 
661 extern ulong srv_adaptive_flushing_lwm;
662 extern ulong srv_flushing_avg_loops;
663 
664 extern ulong srv_force_recovery;
665 #ifdef UNIV_DEBUG
666 extern ulong srv_force_recovery_crash;
667 #endif /* UNIV_DEBUG */
668 
669 /** The value of the configuration parameter innodb_fast_shutdown,
670 controlling the InnoDB shutdown.
671 
672 If innodb_fast_shutdown=0, InnoDB shutdown will purge all undo log
673 records (except XA PREPARE transactions) and complete the merge of the
674 entire change buffer, and then shut down the redo log.
675 
676 If innodb_fast_shutdown=1, InnoDB shutdown will only flush the buffer
677 pool to data files, cleanly shutting down the redo log.
678 
679 If innodb_fast_shutdown=2, shutdown will effectively 'crash' InnoDB
680 (but lose no committed transactions). */
681 extern ulong srv_fast_shutdown;
682 extern ibool srv_innodb_status;
683 
684 extern unsigned long long srv_stats_transient_sample_pages;
685 extern bool srv_stats_persistent;
686 extern unsigned long long srv_stats_persistent_sample_pages;
687 extern bool srv_stats_auto_recalc;
689 
690 extern ulong srv_checksum_algorithm;
691 
692 extern double srv_max_buf_pool_modified_pct;
693 extern ulong srv_max_purge_lag;
694 extern ulong srv_max_purge_lag_delay;
695 
696 extern ulong srv_replication_delay;
697 /*-------------------------------------------*/
698 
699 extern bool srv_print_innodb_monitor;
701 
702 extern ulong srv_n_spin_wait_rounds;
703 extern ulong srv_n_free_tickets_to_enter;
704 extern ulong srv_spin_wait_delay;
705 extern ibool srv_priority_boost;
706 
707 extern ulint srv_truncated_status_writes;
708 
709 #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
711 #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
712 
713 #ifdef UNIV_DEBUG
714 extern bool srv_buf_pool_debug;
715 extern bool srv_sync_debug;
717 
718 /** Value of MySQL global used to disable master thread. */
720 #endif /* UNIV_DEBUG */
721 
723 extern std::atomic<int> srv_fatal_semaphore_wait_extend;
724 
725 extern ulint srv_dml_needed_delay;
726 
727 #ifdef UNIV_HOTBACKUP
728 // MAHI: changed from 130 to 1 assuming the apply-log is single threaded
729 #define SRV_MAX_N_IO_THREADS 1
730 #else /* UNIV_HOTBACKUP */
731 #define SRV_MAX_N_IO_THREADS 130
732 #endif /* UNIV_HOTBACKUP */
733 
734 /* Array of English strings describing the current state of an
735 i/o handler thread */
736 extern const char *srv_io_thread_op_info[];
737 extern const char *srv_io_thread_function[];
738 
739 /* the number of purge threads to use from the worker pool (currently 0 or 1) */
740 extern ulong srv_n_purge_threads;
741 
742 /* the number of pages to purge in one batch */
743 extern ulong srv_purge_batch_size;
744 
745 /* the number of sync wait arrays */
746 extern ulong srv_sync_array_size;
747 
748 /* print all user-level transactions deadlocks to mysqld stderr */
749 extern bool srv_print_all_deadlocks;
750 
751 /** Print all DDL logs to mysqld stderr */
752 extern bool srv_print_ddl_logs;
753 
754 extern bool srv_cmp_per_index_enabled;
755 
756 extern bool srv_redo_log;
757 
758 /** Status variables to be passed to MySQL */
759 extern struct export_var_t export_vars;
760 
761 #ifndef UNIV_HOTBACKUP
762 /** Global counters */
763 extern srv_stats_t srv_stats;
764 
765 /* Keys to register InnoDB threads with performance schema */
766 
767 #ifdef UNIV_PFS_THREAD
800 #endif /* UNIV_PFS_THREAD */
801 #endif /* !UNIV_HOTBACKUP */
802 
803 #ifdef HAVE_PSI_STAGE_INTERFACE
804 /** Performance schema stage event for monitoring ALTER TABLE progress
805 everything after flush log_make_latest_checkpoint(). */
807 
808 /** Performance schema stage event for monitoring ALTER TABLE progress
809 log_make_latest_checkpoint(). */
811 
812 /** Performance schema stage event for monitoring ALTER TABLE progress
813 row_merge_insert_index_tuples(). */
815 
816 /** Performance schema stage event for monitoring ALTER TABLE progress
817 row_log_apply(). */
819 
820 /** Performance schema stage event for monitoring ALTER TABLE progress
821 row_log_table_apply(). */
823 
824 /** Performance schema stage event for monitoring ALTER TABLE progress
825 row_merge_sort(). */
827 
828 /** Performance schema stage event for monitoring ALTER TABLE progress
829 row_merge_read_clustered_index(). */
831 
832 /** Performance schema stage event for monitoring ALTER TABLESPACE
833 ENCRYPTION progress. */
835 
836 /** Performance schema stage event for monitoring buffer pool load progress. */
838 #endif /* HAVE_PSI_STAGE_INTERFACE */
839 
840 /** Performance schema stage event for monitoring clone file copy progress. */
842 
843 /** Performance schema stage event for monitoring clone redo copy progress. */
845 
846 /** Performance schema stage event for monitoring clone page copy progress. */
848 
849 #ifndef _WIN32
850 /** Alternatives for the file flush option in Unix.
851 @see innodb_flush_method_names */
853  SRV_UNIX_FSYNC = 0, /*!< fsync, the default */
854  SRV_UNIX_O_DSYNC, /*!< open log files in O_SYNC mode */
855  SRV_UNIX_LITTLESYNC, /*!< do not call os_file_flush()
856  when writing data files, but do flush
857  after writing to log files */
858  SRV_UNIX_NOSYNC, /*!< do not flush after writing */
859  SRV_UNIX_O_DIRECT, /*!< invoke os_file_set_nocache() on
860  data files. This implies using
861  non-buffered IO but still using fsync,
862  the reason for which is that some FS
863  do not flush meta-data when
864  unbuffered IO happens */
866  /*!< do not use fsync() when using
867  direct IO i.e.: it can be set to avoid
868  the fsync() call that we make when
869  using SRV_UNIX_O_DIRECT. However, in
870  this case user/DBA should be sure about
871  the integrity of the meta-data */
872 };
874 
875 inline bool srv_is_direct_io() {
878 }
879 
880 #else
881 /** Alternatives for file i/o in Windows. @see innodb_flush_method_names. */
882 enum srv_win_flush_t {
883  /** unbuffered I/O; this is the default */
884  SRV_WIN_IO_UNBUFFERED = 0,
885  /** buffered I/O */
886  SRV_WIN_IO_NORMAL,
887 };
888 extern enum srv_win_flush_t srv_win_file_flush_method;
889 
890 inline bool srv_is_direct_io() {
891  return (srv_win_file_flush_method == SRV_WIN_IO_UNBUFFERED);
892 }
893 
894 #endif /* _WIN32 */
895 
896 /** Alternatives for srv_force_recovery. Non-zero values are intended
897 to help the user get a damaged database up so that he can dump intact
898 tables and rows with SELECT INTO OUTFILE. The database must not otherwise
899 be used with these options! A bigger number below means that all precautions
900 of lower numbers are included. */
901 enum {
902  SRV_FORCE_IGNORE_CORRUPT = 1, /*!< let the server run even if it
903  detects a corrupt page */
904  SRV_FORCE_NO_BACKGROUND = 2, /*!< prevent the main thread from
905  running: if a crash would occur
906  in purge, this prevents it */
907  SRV_FORCE_NO_TRX_UNDO = 3, /*!< do not run trx rollback after
908  recovery */
909  SRV_FORCE_NO_IBUF_MERGE = 4, /*!< prevent also ibuf operations:
910  if they would cause a crash, better
911  not do them */
912  SRV_FORCE_NO_UNDO_LOG_SCAN = 5, /*!< do not look at undo logs when
913  starting the database: InnoDB will
914  treat even incomplete transactions
915  as committed */
916  SRV_FORCE_NO_LOG_REDO = 6 /*!< do not do the log roll-forward
917  in connection with recovery */
918 };
919 
920 /* Alternatives for srv_innodb_stats_method, which could be changed by
921 setting innodb_stats_method */
923  SRV_STATS_NULLS_EQUAL, /* All NULL values are treated as
924  equal. This is the default setting
925  for innodb_stats_method */
926  SRV_STATS_NULLS_UNEQUAL, /* All NULL values are treated as
927  NOT equal. */
928  SRV_STATS_NULLS_IGNORED /* NULL values are ignored */
929 };
930 
932 
933 #ifdef UNIV_DEBUG
934 /** Force all user tables to use page compression. */
935 extern ulong srv_debug_compress;
936 #endif /* UNIV_DEBUG */
937 
938 /** Types of threads existing in the system. */
940  SRV_NONE, /*!< None */
941  SRV_WORKER, /*!< threads serving parallelized
942  queries and queries released from
943  lock wait */
944  SRV_PURGE, /*!< Purge coordinator thread */
945  SRV_MASTER /*!< the master thread, (whose type
946  number must be biggest) */
947 };
948 
949 /** Boots Innobase server. */
950 void srv_boot(void);
951 /** Frees the data structures created in srv_init(). */
952 void srv_free(void);
953 
954 /** Sets the info describing an i/o thread current state.
955 @param[in] i The 'segment' of the i/o thread
956 @param[in] str Constant char string describing the state */
957 void srv_set_io_thread_op_info(ulint i, const char *str);
958 
959 /** Resets the info describing an i/o thread current state. */
961 /** Tells the purge thread that there has been activity in the database
962  and wakes up the purge thread if it is suspended (not sleeping). Note
963  that there is a small chance that the purge thread stays suspended
964  (we do not protect our operation with the srv_sys_t:mutex, for
965  performance reasons). */
967 /** Tells the Innobase server that there has been activity in the database
968  and wakes up the master thread if it is suspended (not sleeping). Used
969  in the MySQL interface. Note that there is a small chance that the master
970  thread stays suspended (we do not protect our operation with the kernel
971  mutex, for performace reasons). */
973 #define srv_active_wake_master_thread() \
974  do { \
975  if (!srv_read_only_mode) { \
976  srv_active_wake_master_thread_low(); \
977  } \
978  } while (0)
979 /** Wakes up the master thread if it is suspended or being suspended. */
980 void srv_wake_master_thread(void);
981 #ifndef UNIV_HOTBACKUP
982 /** Outputs to a file the output of the InnoDB Monitor.
983 @param[in] file output stream
984 @param[in] nowait whether to wait for the exclusive global lock_sys latch
985 @param[out] trx_start file position of the start of the list of active
986  transactions
987 @param[out] trx_end file position of the end of the list of active
988  transactions
989 @return false if not all information printed due to failure to obtain necessary
990  mutex */
991 bool srv_printf_innodb_monitor(FILE *file, bool nowait, ulint *trx_start,
992  ulint *trx_end);
993 
994 /** Function to pass InnoDB status variables to MySQL */
995 void srv_export_innodb_status(void);
996 /** Get current server activity count. We don't hold srv_sys::mutex while
997  reading this value as it is only used in heuristics.
998  @return activity count. */
999 ulint srv_get_activity_count(void);
1000 /** Check if there has been any activity.
1001  @return false if no change in activity counter. */
1002 ibool srv_check_activity(ulint old_activity_count); /*!< old activity count */
1003 /** Increment the server activity counter. */
1004 void srv_inc_activity_count(void);
1005 
1006 /** Enqueues a task to server task queue and releases a worker thread, if there
1007  is a suspended one. */
1008 void srv_que_task_enqueue_low(que_thr_t *thr); /*!< in: query thread */
1009 
1010 /** A thread which prints the info output by various InnoDB monitors. */
1011 void srv_monitor_thread();
1012 
1013 /** A thread which prints warnings about semaphore waits which have lasted
1014 too long. These can be used to track bugs which cause hangs. */
1016 
1017 /** The master thread controlling the server. */
1018 void srv_master_thread();
1019 
1020 /** Purge coordinator thread that schedules the purge tasks. */
1022 
1023 /** Worker thread that reads tasks from the work queue and executes them. */
1024 void srv_worker_thread();
1025 
1026 /** Rotate default master key for UNDO tablespace. */
1028 
1029 /** Set encryption for UNDO tablespace with given space id.
1030 @param[in] space_id Undo tablespace id
1031 @param[in] mtr Mini-transaction
1032 @param[in] is_boot true if it is called during server start up.
1033 @return false for success, true otherwise */
1034 bool set_undo_tablespace_encryption(space_id_t space_id, mtr_t *mtr,
1035  bool is_boot);
1036 
1037 /** Enable UNDO tablespaces encryption.
1038 @param[in] is_boot true if it is called during server start up. In this
1039  case, default master key will be used which will be
1040  rotated later with actual master key from keyring.
1041 @return false for success, true otherwise. */
1042 bool srv_enable_undo_encryption(bool is_boot);
1043 
1044 /** Enable REDO log encryption.
1045 @param[in] is_boot true if it is called during server start up. In this
1046  case, default master key will be used which will be
1047  rotated later with actual master key from keyring.
1048 @return false for success, true otherwise. */
1049 bool srv_enable_redo_encryption(bool is_boot);
1050 
1051 /** Get count of tasks in the queue.
1052  @return number of tasks in queue */
1053 ulint srv_get_task_queue_length(void);
1054 
1055 /** Releases threads of the type given from suspension in the thread table.
1056  NOTE! The server mutex has to be reserved by the caller!
1057  @return number of threads released: this may be less than n if not
1058  enough threads were suspended at the moment */
1059 ulint srv_release_threads(enum srv_thread_type type, /*!< in: thread type */
1060  ulint n); /*!< in: number of threads to release */
1061 
1062 /** Check whether the master thread is active.
1063 This is polled during the final phase of shutdown.
1064 The first phase of server shutdown must have already been executed
1065 (or the server must not have been fully started up).
1066 @see srv_pre_dd_shutdown()
1067 @retval true if any thread is active
1068 @retval false if no thread is active */
1070 
1071 /** Wakeup the purge threads. */
1072 void srv_purge_wakeup(void);
1073 
1074 /** Check if the purge threads are active, both coordinator and worker threads
1075 @return true if any thread is active, false if no thread is active */
1077 
1078 /** Create an undo tablespace with an explicit file name
1079 This is called during CREATE UNDO TABLESPACE.
1080 @param[in] space_name tablespace name
1081 @param[in] file_name file name
1082 @param[in] space_id Tablespace ID
1083 @return DB_SUCCESS or error code */
1084 dberr_t srv_undo_tablespace_create(const char *space_name,
1085  const char *file_name, space_id_t space_id);
1086 
1087 /** Initialize undo::spaces and trx_sys_undo_spaces,
1088 called once during srv_start(). */
1089 void undo_spaces_init();
1090 
1091 /** Free the resources occupied by undo::spaces and trx_sys_undo_spaces,
1092 called once during thread de-initialization. */
1093 void undo_spaces_deinit();
1094 
1095 /** Set redo log variable for performance schema global status.
1096 @param[in] enable true => redo log enabled, false => redo log disabled */
1097 void set_srv_redo_log(bool enable);
1098 
1099 #ifdef UNIV_DEBUG
1100 struct SYS_VAR;
1101 
1102 /** Disables master thread. It's used by:
1103  SET GLOBAL innodb_master_thread_disabled_debug = 1 (0).
1104 @param[in] thd thread handle
1105 @param[in] var pointer to system variable
1106 @param[out] var_ptr where the formal string goes
1107 @param[in] save immediate result from check function */
1109  void *var_ptr, const void *save);
1110 #endif /* UNIV_DEBUG */
1111 #endif /* !UNIV_HOTBACKUP */
1112 
1113 /** Status variables to be passed to MySQL */
1115  ulint innodb_data_pending_reads; /*!< Pending reads */
1116  ulint innodb_data_pending_writes; /*!< Pending writes */
1117  ulint innodb_data_pending_fsyncs; /*!< Pending fsyncs */
1118  ulint innodb_data_fsyncs; /*!< Number of fsyncs so far */
1119  ulint innodb_data_read; /*!< Data bytes read */
1120  ulint innodb_data_writes; /*!< I/O write requests */
1121  ulint innodb_data_written; /*!< Data bytes written */
1122  ulint innodb_data_reads; /*!< I/O read requests */
1124  128]; /*!< Buf pool dump status */
1126  128]; /*!< Buf pool load status */
1127  char innodb_buffer_pool_resize_status[512]; /*!< Buf pool resize status */
1128  ulint innodb_buffer_pool_pages_total; /*!< Buffer pool size */
1129  ulint innodb_buffer_pool_pages_data; /*!< Data pages */
1130  ulint innodb_buffer_pool_bytes_data; /*!< File bytes used */
1131  ulint innodb_buffer_pool_pages_dirty; /*!< Dirty data pages */
1132  ulint innodb_buffer_pool_bytes_dirty; /*!< File bytes modified */
1133  ulint innodb_buffer_pool_pages_misc; /*!< Miscellanous pages */
1134  ulint innodb_buffer_pool_pages_free; /*!< Free pages */
1135 #ifdef UNIV_DEBUG
1136  ulint innodb_buffer_pool_pages_latched; /*!< Latched pages */
1137 #endif /* UNIV_DEBUG */
1138  ulint innodb_buffer_pool_read_requests; /*!< buf_pool->stat.n_page_gets */
1139  ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */
1140  ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */
1141  ulint innodb_buffer_pool_pages_flushed; /*!< srv_buf_pool_flushed */
1142  ulint innodb_buffer_pool_write_requests; /*!< srv_buf_pool_write_requests */
1143  ulint innodb_buffer_pool_read_ahead_rnd; /*!< srv_read_ahead_rnd */
1144  ulint innodb_buffer_pool_read_ahead; /*!< srv_read_ahead */
1145  ulint innodb_buffer_pool_read_ahead_evicted; /*!< srv_read_ahead evicted*/
1146  ulint innodb_dblwr_pages_written; /*!< srv_dblwr_pages_written */
1147  ulint innodb_dblwr_writes; /*!< srv_dblwr_writes */
1148  ulint innodb_log_waits; /*!< srv_log_waits */
1149  ulint innodb_log_write_requests; /*!< srv_log_write_requests */
1150  ulint innodb_log_writes; /*!< srv_log_writes */
1151  lsn_t innodb_os_log_written; /*!< srv_os_log_written */
1152  ulint innodb_os_log_fsyncs; /*!< fil_n_log_flushes */
1153  ulint innodb_os_log_pending_writes; /*!< srv_os_log_pending_writes */
1154  ulint innodb_os_log_pending_fsyncs; /*!< fil_n_pending_log_flushes */
1155  ulint innodb_page_size; /*!< UNIV_PAGE_SIZE */
1156  ulint innodb_pages_created; /*!< buf_pool->stat.n_pages_created */
1157  ulint innodb_pages_read; /*!< buf_pool->stat.n_pages_read */
1158  ulint innodb_pages_written; /*!< buf_pool->stat.n_pages_written */
1159  bool innodb_redo_log_enabled; /*!< srv_redo_log */
1160  ulint innodb_row_lock_waits; /*!< srv_n_lock_wait_count */
1161  ulint innodb_row_lock_current_waits; /*!< srv_n_lock_wait_current_count */
1162  int64_t innodb_row_lock_time; /*!< srv_n_lock_wait_time
1163  / 1000 */
1164  ulint innodb_row_lock_time_avg; /*!< srv_n_lock_wait_time
1165  / 1000
1166  / srv_n_lock_wait_count */
1167  ulint innodb_row_lock_time_max; /*!< srv_n_lock_max_wait_time
1168  / 1000 */
1169  ulint innodb_rows_read; /*!< srv_n_rows_read */
1170  ulint innodb_rows_inserted; /*!< srv_n_rows_inserted */
1171  ulint innodb_rows_updated; /*!< srv_n_rows_updated */
1172  ulint innodb_rows_deleted; /*!< srv_n_rows_deleted */
1173  ulint innodb_system_rows_read; /*!< srv_n_system_rows_read */
1174  ulint innodb_system_rows_inserted; /*!< srv_n_system_rows_inserted */
1175  ulint innodb_system_rows_updated; /*!< srv_n_system_rows_updated */
1176  ulint innodb_system_rows_deleted; /*!< srv_n_system_rows_deleted*/
1179  ulint innodb_num_open_files; /*!< fil_n_file_opened */
1180  ulint innodb_truncated_status_writes; /*!< srv_truncated_status_writes */
1181  ulint innodb_undo_tablespaces_total; /*!< total number of undo tablespaces
1182  innoDB is tracking. */
1183  ulint innodb_undo_tablespaces_implicit; /*!< number of undo tablespaces
1184  innoDB created implicitly. */
1185  ulint innodb_undo_tablespaces_explicit; /*!< number of undo tablespaces
1186  the dba created explicitly. */
1187  ulint innodb_undo_tablespaces_active; /*!< number of active undo
1188  tablespaces */
1189 #ifdef UNIV_DEBUG
1190  ulint innodb_purge_trx_id_age; /*!< rw_max_trx_no - purged trx_no */
1191  ulint innodb_purge_view_trx_id_age; /*!< rw_max_trx_no
1192  - purged view's min trx_no */
1193  ulint innodb_ahi_drop_lookups; /*!< number of adaptive hash
1194  index lookups when freeing
1195  file pages */
1196 #endif /* UNIV_DEBUG */
1197 };
1198 
1199 #ifndef UNIV_HOTBACKUP
1200 /** Thread slot in the thread table. */
1201 struct srv_slot_t {
1202  /** Thread type: user, utility etc. */
1204 
1205  /** TRUE if this slot is in use. */
1206  bool in_use;
1207 
1208  /** TRUE if the thread is waiting for the event of this slot. */
1210 
1211  /** Time when the thread was suspended. Initialized by
1212  lock_wait_table_reserve_slot() for lock wait. */
1214 
1215  /** Stores the current value of lock_wait_table_reservations, when
1216  lock_wait_table_reserve_slot is called.
1217  This can be used as a version number to avoid ABA problems.
1218  The difference lock_wait_table_reservations - reservation_no tells us how many
1219  other threads got suspended while our thr was sleeping.
1220  This can be used to determine if the wait was unfairly long, and it is time to
1221  boost trx->lock.schedule_weight.
1222  Protected by lock->wait_mutex. */
1223  uint64_t reservation_no;
1224 
1225  /** Wait time that if exceeded the thread will be timed out.
1226  Initialized by lock_wait_table_reserve_slot() for lock wait. */
1228 
1229  /** Event used in suspending the thread when it has nothing to do. */
1231 
1232  /** Suspended query thread (only used for user threads). */
1234 };
1235 #endif /* !UNIV_HOTBACKUP */
1236 
1237 #endif
srv_misc_tmpfile_mutex
ib_mutex_t srv_misc_tmpfile_mutex
Mutex for locking srv_misc_tmpfile.
Definition: srv0srv.cc:592
srv_purge_wakeup
void srv_purge_wakeup(void)
Wakeup the purge threads.
Definition: srv0srv.cc:3308
srv_n_page_hash_locks
ulong srv_n_page_hash_locks
Number of locks to protect buf_pool->page_hash.
Definition: srv0srv.cc:406
srv_buf_pool_debug
bool srv_buf_pool_debug
This is used to enable multiple buffer pool instances with small buffer pool size.
Definition: buf0buf.cc:324
srv_is_direct_io
bool srv_is_direct_io()
Definition: srv0srv.h:875
srv_debug_compress
ulong srv_debug_compress
Force all user tables to use page compression.
Definition: srv0srv.cc:210
lsn_t
uint64_t lsn_t
Type used for all log sequence number storage and arithmetics.
Definition: log0types.h:60
export_var_t::innodb_row_lock_current_waits
ulint innodb_row_lock_current_waits
srv_n_lock_wait_current_count
Definition: srv0srv.h:1161
log_ddl
Log_DDL * log_ddl
Object to handle Log_DDL.
Definition: log0ddl.cc:60
log_writer_thread_key
mysql_pfs_key_t log_writer_thread_key
export_var_t::innodb_rows_deleted
ulint innodb_rows_deleted
srv_n_rows_deleted
Definition: srv0srv.h:1172
srv_que_task_enqueue_low
void srv_que_task_enqueue_low(que_thr_t *thr)
Enqueues a task to server task queue and releases a worker thread, if there is a suspended one.
Definition: srv0srv.cc:3279
export_var_t::innodb_buffer_pool_load_status
char innodb_buffer_pool_load_status[OS_FILE_MAX_PATH+128]
Buf pool load status.
Definition: srv0srv.h:1126
THD
Definition: sql_class.h:807
srv_wake_purge_thread_if_not_active
void srv_wake_purge_thread_if_not_active(void)
Tells the purge thread that there has been activity in the database and wakes up the purge thread if ...
Definition: srv0srv.cc:1909
export_var_t::innodb_buffer_pool_wait_free
ulint innodb_buffer_pool_wait_free
srv_buf_pool_wait_free
Definition: srv0srv.h:1140
srv_buf_resize_event
os_event_t srv_buf_resize_event
The buffer pool resize thread waits on this event.
Definition: srv0srv.cc:745
srv_monitor_thread
void srv_monitor_thread()
A thread which prints the info output by various InnoDB monitors.
Definition: srv0srv.cc:1705
srv_adaptive_flushing_lwm
ulong srv_adaptive_flushing_lwm
Definition: srv0srv.cc:468
srv_stats_t::os_log_pending_writes
lint_ctr_1_t os_log_pending_writes
Number of writes being done to the log files.
Definition: srv0srv.h:90
export_var_t::innodb_buffer_pool_pages_flushed
ulint innodb_buffer_pool_pages_flushed
srv_buf_pool_flushed
Definition: srv0srv.h:1141
srv_error_monitor_thread
void srv_error_monitor_thread()
A thread which prints warnings about semaphore waits which have lasted too long.
Definition: srv0srv.cc:1781
log_write_notifier_thread_key
mysql_pfs_key_t log_write_notifier_thread_key
Srv_threads::m_fts_optimize
IB_thread m_fts_optimize
Thread doing optimization for FTS index.
Definition: srv0srv.h:240
srv_log_wait_for_write_spin_delay
ulong srv_log_wait_for_write_spin_delay
Number of spin iterations, when spinning and waiting for log buffer written up to given LSN,...
Definition: srv0srv.cc:292
export_var_t::innodb_truncated_status_writes
ulint innodb_truncated_status_writes
srv_truncated_status_writes
Definition: srv0srv.h:1180
srv_stage_clone_redo_copy
PSI_stage_info srv_stage_clone_redo_copy
Performance schema stage event for monitoring clone redo copy progress.
Definition: srv0srv.cc:816
export_var_t::innodb_rows_updated
ulint innodb_rows_updated
srv_n_rows_updated
Definition: srv0srv.h:1171
srv_unix_flush_t
srv_unix_flush_t
Alternatives for the file flush option in Unix.
Definition: srv0srv.h:852
Srv_threads::m_buf_resize
IB_thread m_buf_resize
Buffer pool resize thread.
Definition: srv0srv.h:193
srv_stats_t::buf_pool_flushed
ulint_ctr_1_t buf_pool_flushed
Count the number of pages that were written from buffer pool to the disk.
Definition: srv0srv.h:113
srv_online_max_size
unsigned long long srv_online_max_size
Maximum modification log file size for online index creation.
Definition: srv0srv.cc:193
SYS_VAR
Definition: plugin.h:62
srv_stats_include_delete_marked
bool srv_stats_include_delete_marked
Definition: srv0srv.cc:541
Srv_threads::m_backup_log_archiver
IB_thread m_backup_log_archiver
Redo log archiver (used by backup).
Definition: srv0srv.h:187
srv_enable_redo_encryption
bool srv_enable_redo_encryption(bool is_boot)
Enable REDO log encryption.
Definition: srv0srv.cc:2516
export_var_t::innodb_sampled_pages_read
ulint innodb_sampled_pages_read
Definition: srv0srv.h:1177
srv_stage_alter_table_log_index
PSI_stage_info srv_stage_alter_table_log_index
Performance schema stage event for monitoring ALTER TABLE progress row_log_apply().
Definition: srv0srv.cc:779
srv_thread_is_stopped
bool srv_thread_is_stopped(const IB_thread &thread)
Check if given thread is cleaned-up and stopped.
Definition: srv0srv.cc:3350
Srv_threads::m_log_flush_notifier
IB_thread m_log_flush_notifier
Redo flush notifier thread.
Definition: srv0srv.h:184
srv_log_recent_written_size
ulong srv_log_recent_written_size
Number of slots in a small buffer, which is used to allow concurrent writes to log buffer.
Definition: srv0srv.cc:282
srv_flush_log_at_timeout
uint srv_flush_log_at_timeout
Definition: srv0srv.cc:358
export_var_t::innodb_system_rows_read
ulint innodb_system_rows_read
srv_n_system_rows_read
Definition: srv0srv.h:1173
srv_max_purge_lag
ulong srv_max_purge_lag
Maximum allowable purge history length.
Definition: trx0purge.cc:66
srv_validate_tablespace_paths
bool srv_validate_tablespace_paths
Whether to validate InnoDB tablespace paths on startup.
Definition: srv0srv.cc:408
srv_stats_t::log_write_requests
ulint_ctr_1_t log_write_requests
Number of the log write requests done.
Definition: srv0srv.h:81
srv_stats_t::dblwr_pages_written
ulint_ctr_1_t dblwr_pages_written
Store the number of pages that have been flushed to the doublewrite buffer.
Definition: srv0srv.h:101
srv_stats_t::ulint_ctr_64_t
ib_counter_t< ulint, 64 > ulint_ctr_64_t
Definition: srv0srv.h:71
os0thread.h
undo_rotate_default_master_key
void undo_rotate_default_master_key()
Rotate default master key for UNDO tablespace.
Definition: srv0srv.cc:2463
srv_stats_t::n_rows_inserted
ulint_ctr_64_t n_rows_inserted
Number of rows inserted.
Definition: srv0srv.h:141
srv_n_page_cleaners
ulong srv_n_page_cleaners
Definition: srv0srv.cc:456
export_var_t::innodb_row_lock_time_avg
ulint innodb_row_lock_time_avg
srv_n_lock_wait_time / 1000 / srv_n_lock_wait_count
Definition: srv0srv.h:1164
export_var_t::innodb_sampled_pages_skipped
ulint innodb_sampled_pages_skipped
Definition: srv0srv.h:1178
Srv_cpu_usage::n_cpu
int n_cpu
Definition: srv0srv.h:279
srv_buf_pool_instances
ulong srv_buf_pool_instances
Requested number of buffer pool instances.
Definition: srv0srv.cc:402
srv_stats_t::n_sampled_pages_read
ulint_ctr_64_t n_sampled_pages_read
Number of sampled pages read.
Definition: srv0srv.h:156
srv_purge_thread_key
mysql_pfs_key_t srv_purge_thread_key
srv_ibuf_disable_background_merge
bool srv_ibuf_disable_background_merge
Definition: ibuf0ibuf.cc:43
srv_buf_dump_event
os_event_t srv_buf_dump_event
The buffer pool dump/load thread waits on this event.
Definition: srv0srv.cc:742
srv_wake_master_thread
void srv_wake_master_thread(void)
Wakes up the master thread if it is suspended or being suspended.
Definition: srv0srv.cc:1919
srv_purge_coordinator_thread
void srv_purge_coordinator_thread()
Purge coordinator thread that schedules the purge tasks.
Definition: srv0srv.cc:3156
srv_stats_t::n_rows_deleted
ulint_ctr_64_t n_rows_deleted
Number of rows deleted.
Definition: srv0srv.h:138
Srv_threads::m_page_cleaner_coordinator
IB_thread m_page_cleaner_coordinator
Page cleaner coordinator (also being a worker).
Definition: srv0srv.h:224
srv_buf_pool_chunk_unit_min
const ulonglong srv_buf_pool_chunk_unit_min
Minimum buffer pool chunk size.
Definition: srv0srv.cc:395
export_var_t::innodb_pages_written
ulint innodb_pages_written
buf_pool->stat.n_pages_written
Definition: srv0srv.h:1158
srv_load_corrupted
bool srv_load_corrupted
Definition: dict0load.cc:138
io_read_thread_key
mysql_pfs_key_t io_read_thread_key
Srv_threads::m_page_archiver
IB_thread m_page_archiver
Archiver's page archiver (used by Clone).
Definition: srv0srv.h:237
srv_log_spin_cpu_pct_hwm
uint srv_log_spin_cpu_pct_hwm
Maximum percentage of cpu time for which spin-delay is used.
Definition: srv0srv.cc:259
export_var_t::innodb_buffer_pool_pages_dirty
ulint innodb_buffer_pool_pages_dirty
Dirty data pages.
Definition: srv0srv.h:1131
Srv_threads::m_dict_stats
IB_thread m_dict_stats
Dict stats background thread.
Definition: srv0srv.h:196
srv_undo_tablespace_create
dberr_t srv_undo_tablespace_create(const char *space_name, const char *file_name, space_id_t space_id)
Create an undo tablespace with an explicit file name This is called during CREATE UNDO TABLESPACE.
Definition: srv0start.cc:1399
mtr_t
Mini-transaction handle and buffer.
Definition: mtr0mtr.h:169
dict_stats_thread_key
mysql_pfs_key_t dict_stats_thread_key
os_event
InnoDB condition variable.
Definition: os0event.cc:66
srv_flush_neighbors
ulong srv_flush_neighbors
Whether or not to flush neighbors of a block.
Definition: srv0srv.cc:412
export_var_t::innodb_buffer_pool_read_ahead_rnd
ulint innodb_buffer_pool_read_ahead_rnd
srv_read_ahead_rnd
Definition: srv0srv.h:1143
srv_stats_t::n_lock_wait_count
ulint_ctr_1_t n_lock_wait_count
Number of database lock waits.
Definition: srv0srv.h:126
srv_log_writer_spin_delay
ulong srv_log_writer_spin_delay
Number of spin iterations, for which log writer thread is waiting for new data to write or flush with...
Definition: srv0srv.cc:309
page_zip_stat_per_index_mutex
ib_mutex_t page_zip_stat_per_index_mutex
Mutex protecting page_zip_stat_per_index.
Definition: srv0srv.cc:582
export_var_t::innodb_os_log_fsyncs
ulint innodb_os_log_fsyncs
fil_n_log_flushes
Definition: srv0srv.h:1152
srv_log_write_notifier_spin_delay
ulong srv_log_write_notifier_spin_delay
Number of spin iterations, for which log write notifier thread is waiting for advanced writeed_to_dis...
Definition: srv0srv.cc:328
export_var_t::innodb_data_pending_fsyncs
ulint innodb_data_pending_fsyncs
Pending fsyncs.
Definition: srv0srv.h:1117
srv_log_checkpoint_every
ulong srv_log_checkpoint_every
Number of milliseconds every which a periodical checkpoint is written by the log checkpointer thread ...
Definition: srv0srv.cc:317
srv_downgrade_logs
bool srv_downgrade_logs
srv_data_home
char * srv_data_home
Definition: srv0srv.cc:128
srv_stats_t::buf_pool_write_requests
ulint_ctr_1_t buf_pool_write_requests
Store the number of write requests issued.
Definition: srv0srv.h:104
srv_stage_clone_page_copy
PSI_stage_info srv_stage_clone_page_copy
Performance schema stage event for monitoring clone page copy progress.
Definition: srv0srv.cc:820
srv_truncated_status_writes
ulint srv_truncated_status_writes
Definition: srv0srv.cc:564
longlong
long long int longlong
Definition: my_inttypes.h:54
srv_slot_t::thr
que_thr_t * thr
Suspended query thread (only used for user threads).
Definition: srv0srv.h:1233
srv_io_capacity
ulong srv_io_capacity
Definition: srv0srv.cc:452
Srv_cpu_usage::utime_pct
double utime_pct
Definition: srv0srv.h:282
srv_unix_file_flush_method
enum srv_unix_flush_t srv_unix_file_flush_method
Definition: srv0srv.cc:444
export_var_t::innodb_data_read
ulint innodb_data_read
Data bytes read.
Definition: srv0srv.h:1119
srv_redo_log_encrypt
bool srv_redo_log_encrypt
Enable or Disable Encrypt of REDO tablespace.
Definition: srv0srv.cc:225
Srv_cpu_usage::stime_abs
double stime_abs
Definition: srv0srv.h:281
dberr_t
dberr_t
Definition: db0err.h:38
SRV_STATS_NULLS_EQUAL
@ SRV_STATS_NULLS_EQUAL
Definition: srv0srv.h:923
srv_printf_innodb_monitor
bool srv_printf_innodb_monitor(FILE *file, bool nowait, ulint *trx_start, ulint *trx_end)
Outputs to a file the output of the InnoDB Monitor.
Definition: srv0srv.cc:1292
export_var_t::innodb_dblwr_pages_written
ulint innodb_dblwr_pages_written
srv_dblwr_pages_written
Definition: srv0srv.h:1146
srv_checksum_algorithm
ulong srv_checksum_algorithm
the macro MYSQL_SYSVAR_ENUM() requires "long unsigned int" and if we use srv_checksum_algorithm_t her...
Definition: checksum.cc:55
srv_sync_array_size
ulong srv_sync_array_size
User configured sync array size.
Definition: sync0arr.cc:166
srv_error_event
os_event_t srv_error_event
Event to signal the error thread.
Definition: srv0srv.cc:739
Srv_threads::m_purge_workers
IB_thread * m_purge_workers
Purge workers.
Definition: srv0srv.h:221
srv_stats_t::ulint_ctr_1_t
ib_counter_t< ulint, 1, single_indexer_t > ulint_ctr_1_t
Definition: srv0srv.h:73
export_var_t::innodb_system_rows_inserted
ulint innodb_system_rows_inserted
srv_n_system_rows_inserted
Definition: srv0srv.h:1174
export_var_t::innodb_ahi_drop_lookups
ulint innodb_ahi_drop_lookups
number of adaptive hash index lookups when freeing file pages
Definition: srv0srv.h:1193
srv_log_wait_for_write_timeout
ulong srv_log_wait_for_write_timeout
Timeout used when waiting for redo write (microseconds).
Definition: srv0srv.cc:296
srv_stats_t::lsn_ctr_1_t
ib_counter_t< lsn_t, 1, single_indexer_t > lsn_ctr_1_t
Definition: srv0srv.h:72
SRV_STATS_NULLS_IGNORED
@ SRV_STATS_NULLS_IGNORED
Definition: srv0srv.h:928
export_var_t::innodb_os_log_written
lsn_t innodb_os_log_written
srv_os_log_written
Definition: srv0srv.h:1151
srv_thread_is_active
bool srv_thread_is_active(const IB_thread &thread)
Check if given thread is still active.
Definition: srv0srv.cc:3346
srv_stats_t::data_written
ulint_ctr_1_t data_written
Count the amount of data written in total (in bytes)
Definition: srv0srv.h:78
srv_log_writer_timeout
ulong srv_log_writer_timeout
Initial timeout used to wait on writer_event.
Definition: srv0srv.cc:312
tbsp_extend_and_initialize
bool tbsp_extend_and_initialize
Enable or disable writing of NULLs while extending a tablespace.
Definition: srv0srv.cc:484
SRV_FORCE_NO_IBUF_MERGE
@ SRV_FORCE_NO_IBUF_MERGE
prevent also ibuf operations: if they would cause a crash, better not do them
Definition: srv0srv.h:909
srv_threads
Srv_threads srv_threads
Structure with state of srv background threads.
Definition: srv0srv.cc:97
SRV_UNIX_O_DIRECT
@ SRV_UNIX_O_DIRECT
invoke os_file_set_nocache() on data files.
Definition: srv0srv.h:859
export_var_t::innodb_row_lock_waits
ulint innodb_row_lock_waits
srv_n_lock_wait_count
Definition: srv0srv.h:1160
srv_active_wake_master_thread_low
void srv_active_wake_master_thread_low(void)
Tells the Innobase server that there has been activity in the database and wakes up the master thread...
Definition: srv0srv.cc:1873
srv_buf_pool_chunk_unit
ulonglong srv_buf_pool_chunk_unit
Requested buffer pool chunk size.
Definition: srv0srv.cc:393
SRV_MASTER
@ SRV_MASTER
the master thread, (whose type number must be biggest)
Definition: srv0srv.h:945
export_var_t::innodb_buffer_pool_dump_status
char innodb_buffer_pool_dump_status[OS_FILE_MAX_PATH+128]
Buf pool dump status.
Definition: srv0srv.h:1124
srv_undo_log_truncate
bool srv_undo_log_truncate
Enable or Disable Truncate of UNDO tablespace.
Definition: srv0srv.cc:168
srv_n_log_files
ulong srv_n_log_files
Definition: srv0srv.cc:227
srv_stats_t::n_lock_wait_current_count
lint_ctr_1_t n_lock_wait_current_count
Number of threads currently waiting on database locks.
Definition: srv0srv.h:129
set_undo_tablespace_encryption
bool set_undo_tablespace_encryption(space_id_t space_id, mtr_t *mtr, bool is_boot)
Set encryption for UNDO tablespace with given space id.
Definition: srv0srv.cc:2551
io_ibuf_thread_key
mysql_pfs_key_t io_ibuf_thread_key
srv_stats_t::n_system_rows_deleted
ulint_ctr_64_t n_system_rows_deleted
Number of system rows deleted.
Definition: srv0srv.h:150
srv_read_ahead_threshold
ulong srv_read_ahead_threshold
Definition: srv0srv.cc:437
srv_sync_debug
bool srv_sync_debug
Definition: sync0debug.cc:60
Srv_threads::m_master
IB_thread m_master
The master thread.
Definition: srv0srv.h:202
export_var_t::innodb_os_log_pending_fsyncs
ulint innodb_os_log_pending_fsyncs
fil_n_pending_log_flushes
Definition: srv0srv.h:1154
buf_resize_thread_key
mysql_pfs_key_t buf_resize_thread_key
srv_log_flush_events
ulong srv_log_flush_events
Number of events used for notifications about redo flush.
Definition: srv0srv.cc:277
srv_stats_t::n_system_rows_inserted
ulint_ctr_64_t n_system_rows_inserted
Number of system rows inserted.
Definition: srv0srv.h:153
srv_io_thread_function
const char * srv_io_thread_function[]
Definition: srv0srv.cc:573
que0types.h
srv_log_wait_for_flush_spin_delay
ulong srv_log_wait_for_flush_spin_delay
Number of spin iterations, when spinning and waiting for log flushed.
Definition: srv0srv.cc:300
Srv_threads::m_master_ready_for_dd_shutdown
os_event_t m_master_ready_for_dd_shutdown
When the master thread notices that shutdown has started (by noticing srv_shutdown_state >= SRV_SHUTD...
Definition: srv0srv.h:262
Srv_threads::m_log_write_notifier
IB_thread m_log_write_notifier
Redo write notifier thread.
Definition: srv0srv.h:181
srv_LRU_scan_depth
ulong srv_LRU_scan_depth
Scan depth for LRU flush batch i.e.
Definition: srv0srv.cc:410
srv_purge_threads_active
bool srv_purge_threads_active()
Check if the purge threads are active, both coordinator and worker threads.
Definition: srv0srv.cc:3325
srv_rollback_segments
ulong srv_rollback_segments
The number of rollback segments per tablespace.
Definition: srv0srv.cc:147
n
int n
Definition: xcom_base.cc:445
srv_monitor_event
os_event_t srv_monitor_event
Event to signal the monitor thread.
Definition: srv0srv.cc:736
srv_stats_t::n_rows_read
ulint_ctr_64_t n_rows_read
Number of rows read.
Definition: srv0srv.h:132
log_flush_notifier_thread_key
mysql_pfs_key_t log_flush_notifier_thread_key
buf_dump_thread_key
mysql_pfs_key_t buf_dump_thread_key
srv_max_dirty_pages_pct
double srv_max_dirty_pages_pct
srv_inject_too_many_concurrent_trxs
bool srv_inject_too_many_concurrent_trxs
Definition: srv0srv.cc:353
srv_print_innodb_monitor
bool srv_print_innodb_monitor
Definition: srv0srv.cc:566
srv_master_thread_disabled_debug
bool srv_master_thread_disabled_debug
Value of MySQL global used to disable master thread.
Definition: srv0srv.cc:214
io_log_thread_key
mysql_pfs_key_t io_log_thread_key
srv_stats_transient_sample_pages
unsigned long long srv_stats_transient_sample_pages
Definition: srv0srv.cc:539
srv_enable_undo_encryption
bool srv_enable_undo_encryption(bool is_boot)
Enable UNDO tablespaces encryption.
Definition: srv0srv.cc:2594
srv_buf_pool_chunk_unit_max
const ulonglong srv_buf_pool_chunk_unit_max
Maximum buffer pool chunk size.
Definition: srv0srv.cc:399
srv_stats_t::n_lock_wait_time
int64_ctr_1_t n_lock_wait_time
Wait time of database locks.
Definition: srv0srv.h:123
Srv_threads
Structure which keeps shared future objects for InnoDB background threads.
Definition: srv0srv.h:164
SRV_UNIX_NOSYNC
@ SRV_UNIX_NOSYNC
do not flush after writing
Definition: srv0srv.h:858
srv_stats_auto_recalc
bool srv_stats_auto_recalc
Definition: srv0srv.cc:543
Srv_threads::m_log_flusher
IB_thread m_log_flusher
Redo flusher thread.
Definition: srv0srv.h:178
srv_dml_needed_delay
ulint srv_dml_needed_delay
Definition: srv0srv.cc:119
SRV_STATS_NULLS_UNEQUAL
@ SRV_STATS_NULLS_UNEQUAL
Definition: srv0srv.h:926
srv_stats_t::log_writes
ulint_ctr_1_t log_writes
Number of physical writes to the log performed.
Definition: srv0srv.h:84
Srv_cpu_usage::stime_pct
double stime_pct
Definition: srv0srv.h:283
high_level_read_only
bool high_level_read_only
Set if InnoDB operates in read-only mode or innodb-force-recovery is greater than SRV_FORCE_NO_TRX_UN...
Definition: srv0srv.cc:196
srv_log_write_events
ulong srv_log_write_events
Number of events used for notifications about redo write.
Definition: srv0srv.cc:274
SRV_UNIX_LITTLESYNC
@ SRV_UNIX_LITTLESYNC
do not call os_file_flush() when writing data files, but do flush after writing to log files
Definition: srv0srv.h:855
srv_adaptive_max_sleep_delay
ulong srv_adaptive_max_sleep_delay
Maximum sleep delay (in micro-seconds), value of 0 disables it.
Definition: srv0conc.cc:62
srv_master_thread_is_active
bool srv_master_thread_is_active()
Check whether the master thread is active.
Definition: srv0srv.cc:1864
srv_flush_sync
bool srv_flush_sync
Definition: srv0srv.cc:369
recv_writer_thread_key
mysql_pfs_key_t recv_writer_thread_key
srv_log_group_home_dir
char * srv_log_group_home_dir
Definition: srv0srv.cc:222
srv_stats_t::log_waits
ulint_ctr_1_t log_waits
We increase this counter, when we don't have enough space in the log buffer and have to flush it.
Definition: srv0srv.h:94
srv_stats_t::n_system_rows_updated
ulint_ctr_64_t n_system_rows_updated
Number of system rows updated.
Definition: srv0srv.h:147
Log_DDL
Class to write and replay ddl logs.
Definition: log0ddl.h:404
export_var_t::innodb_data_written
ulint innodb_data_written
Data bytes written.
Definition: srv0srv.h:1121
io_write_thread_key
mysql_pfs_key_t io_write_thread_key
srv_log_write_ahead_size
ulong srv_log_write_ahead_size
Size of block, used for writing ahead to avoid read-on-write.
Definition: srv0srv.h:568
log0types.h
srv_stats_method_name_enum
srv_stats_method_name_enum
Definition: srv0srv.h:922
srv_stage_alter_table_insert
PSI_stage_info srv_stage_alter_table_insert
Performance schema stage event for monitoring ALTER TABLE progress row_merge_insert_index_tuples().
Definition: srv0srv.cc:774
srv_max_io_capacity
ulong srv_max_io_capacity
Definition: srv0srv.cc:453
srv_log_recent_closed_size
ulong srv_log_recent_closed_size
Number of slots in a small buffer, which is used to break requirement for total order of dirty pages,...
Definition: srv0srv.cc:287
srv_slot_t::type
srv_thread_type type
Thread type: user, utility etc.
Definition: srv0srv.h:1203
undo_spaces_init
void undo_spaces_init()
Initialize undo::spaces and trx_sys_undo_spaces, called once during srv_start().
Definition: srv0start.cc:1467
SRV_FORCE_IGNORE_CORRUPT
@ SRV_FORCE_IGNORE_CORRUPT
let the server run even if it detects a corrupt page
Definition: srv0srv.h:902
os0file.h
clone_gtid_thread_key
mysql_pfs_key_t clone_gtid_thread_key
SRV_UNIX_FSYNC
@ SRV_UNIX_FSYNC
fsync, the default
Definition: srv0srv.h:853
SRV_UNIX_O_DSYNC
@ SRV_UNIX_O_DSYNC
open log files in O_SYNC mode
Definition: srv0srv.h:854
SRV_WORKER
@ SRV_WORKER
threads serving parallelized queries and queries released from lock wait
Definition: srv0srv.h:941
undo_spaces_deinit
void undo_spaces_deinit()
Free the resources occupied by undo::spaces and trx_sys_undo_spaces, called once during thread de-ini...
Definition: srv0start.cc:1479
srv_flush_log_at_trx_commit
ulong srv_flush_log_at_trx_commit
Definition: srv0srv.cc:357
srv_log_flusher_timeout
ulong srv_log_flusher_timeout
Initial timeout used to wait on flusher_event.
Definition: srv0srv.cc:324
srv_upgrade_old_undo_found
bool srv_upgrade_old_undo_found
export_var_t::innodb_purge_view_trx_id_age
ulint innodb_purge_view_trx_id_age
rw_max_trx_no
Definition: srv0srv.h:1191
srv_buf_pool_instances_default
const ulong srv_buf_pool_instances_default
Default number of buffer pool instances.
Definition: srv0srv.cc:404
srv_force_recovery
ulong srv_force_recovery
Normally 0.
Definition: srv0srv.cc:497
srv_monitor_thread_key
mysql_pfs_key_t srv_monitor_thread_key
log_flusher_thread_key
mysql_pfs_key_t log_flusher_thread_key
srv_disable_sort_file_cache
bool srv_disable_sort_file_cache
Definition: row0merge.cc:70
srv_adaptive_flushing
bool srv_adaptive_flushing
Definition: srv0srv.cc:366
fts_optimize_thread_key
mysql_pfs_key_t fts_optimize_thread_key
SRV_FORCE_NO_BACKGROUND
@ SRV_FORCE_NO_BACKGROUND
prevent the main thread from running: if a crash would occur in purge, this prevents it
Definition: srv0srv.h:904
srv_downgrade_partition_files
bool srv_downgrade_partition_files
Definition: srv0srv.cc:111
export_var_t::innodb_data_pending_writes
ulint innodb_data_pending_writes
Pending writes.
Definition: srv0srv.h:1116
srv_stats_t::buf_pool_reads
ulint_ctr_1_t buf_pool_reads
Number of buffer pool reads that led to the reading of a disk page.
Definition: srv0srv.h:117
srv_master_thread_disabled_debug_update
void srv_master_thread_disabled_debug_update(THD *thd, SYS_VAR *var, void *var_ptr, const void *save)
Disables master thread.
Definition: srv0srv.cc:2021
uint
unsigned int uint
Definition: uca-dump.cc:29
PSI_stage_info_v1
Stage instrument information.
Definition: psi_stage_bits.h:73
srv_buf_pool_chunk_unit_blk_sz
const ulonglong srv_buf_pool_chunk_unit_blk_sz
The buffer pool chunk size must be a multiple of this number.
Definition: srv0srv.cc:397
set_srv_redo_log
void set_srv_redo_log(bool enable)
Set redo log variable for performance schema global status.
Definition: srv0srv.cc:3360
srv_undo_log_encrypt
bool srv_undo_log_encrypt
Enable or disable Encrypt of UNDO tablespace.
Definition: srv0srv.cc:171
export_var_t::innodb_row_lock_time_max
ulint innodb_row_lock_time_max
srv_n_lock_max_wait_time / 1000
Definition: srv0srv.h:1167
Srv_threads::m_purge_workers_n
size_t m_purge_workers_n
Number of purge workers and size of array below.
Definition: srv0srv.h:217
clone_ddl_thread_key
mysql_pfs_key_t clone_ddl_thread_key
srv_error_monitor_thread_key
mysql_pfs_key_t srv_error_monitor_thread_key
srv_innodb_status
ibool srv_innodb_status
Definition: srv0srv.cc:531
srv_innodb_directories
char * srv_innodb_directories
The innodb_directories variable value.
Definition: srv0srv.cc:135
srv_undo_dir
char * srv_undo_dir
Server undo tablespaces directory, can be absolute path.
Definition: srv0srv.cc:139
srv_stage_alter_table_merge_sort
PSI_stage_info srv_stage_alter_table_merge_sort
Performance schema stage event for monitoring ALTER TABLE progress row_merge_sort().
Definition: srv0srv.cc:791
Srv_threads::m_gtid_persister
IB_thread m_gtid_persister
Thread for GTID persistence.
Definition: srv0srv.h:243
export_var_t::innodb_undo_tablespaces_active
ulint innodb_undo_tablespaces_active
number of active undo tablespaces
Definition: srv0srv.h:1187
page_archiver_thread_key
mysql_pfs_key_t page_archiver_thread_key
srv_change_buffer_max_size
uint srv_change_buffer_max_size
Maximum on-disk size of change buffer in terms of percentage of the buffer pool.
Definition: srv0srv.cc:441
trx_recovery_rollback_thread_key
mysql_pfs_key_t trx_recovery_rollback_thread_key
srv_stats_t::dblwr_writes
ulint_ctr_1_t dblwr_writes
Count the number of times the doublewrite buffer was flushed.
Definition: srv0srv.h:97
srv_buf_pool_base_size
ulint srv_buf_pool_base_size
Current size as scaling factor for the other components.
Definition: srv0srv.cc:416
srv_free
void srv_free(void)
Frees the data structures created in srv_init().
Definition: srv0srv.cc:1160
srv_slot_t::suspend_time
ib_time_monotonic_t suspend_time
Time when the thread was suspended.
Definition: srv0srv.h:1213
export_var_t::innodb_buffer_pool_pages_data
ulint innodb_buffer_pool_pages_data
Data pages.
Definition: srv0srv.h:1129
srv_inc_activity_count
void srv_inc_activity_count(void)
Increment the server activity counter.
Definition: srv0srv.cc:1855
fts_parallel_merge_thread_key
mysql_pfs_key_t fts_parallel_merge_thread_key
Srv_threads::m_recv_writer
IB_thread m_recv_writer
Thread writing recovered pages during recovery.
Definition: srv0srv.h:211
mysql_pfs_key_t
Define for performance schema registration key.
Definition: sync0sync.h:50
srv_max_buf_pool_modified_pct
double srv_max_buf_pool_modified_pct
Definition: srv0srv.cc:463
export_var_t::innodb_num_open_files
ulint innodb_num_open_files
fil_n_file_opened
Definition: srv0srv.h:1179
srv_stage_buffer_pool_load
PSI_stage_info srv_stage_buffer_pool_load
Performance schema stage event for monitoring buffer pool load progress.
Definition: srv0srv.cc:807
export_var_t::innodb_buffer_pool_resize_status
char innodb_buffer_pool_resize_status[512]
Buf pool resize status.
Definition: srv0srv.h:1127
Srv_cpu_usage
Definition: srv0srv.h:278
trx0types.h
srv_log_write_notifier_timeout
ulong srv_log_write_notifier_timeout
Initial timeout used to wait on write_notifier_event.
Definition: srv0srv.cc:332
srv_n_file_io_threads
ulint srv_n_file_io_threads
Number of IO threads to use.
Definition: srv0start.cc:136
export_var_t::innodb_buffer_pool_reads
ulint innodb_buffer_pool_reads
srv_buf_pool_reads
Definition: srv0srv.h:1139
page_flush_thread_key
mysql_pfs_key_t page_flush_thread_key
srv_export_innodb_status
void srv_export_innodb_status(void)
Function to pass InnoDB status variables to MySQL.
Definition: srv0srv.cc:1512
srv0conc.h
srv_flushing_avg_loops
ulong srv_flushing_avg_loops
Definition: srv0srv.cc:471
srv_dblwr_pages
ulong srv_dblwr_pages
Number of pages per doublewrite thread/segment.
Srv_threads::m_monitor
IB_thread m_monitor
Monitor thread (prints info).
Definition: srv0srv.h:166
export_var_t::innodb_redo_log_enabled
bool innodb_redo_log_enabled
srv_redo_log
Definition: srv0srv.h:1159
srv_cpu_usage
Srv_cpu_usage srv_cpu_usage
Structure with cpu usage information.
Definition: srv0srv.cc:100
srv_stats_t::n_system_rows_read
ulint_ctr_64_t n_system_rows_read
Number of system rows read.
Definition: srv0srv.h:144
srv_log_writer_threads
bool srv_log_writer_threads
Whether to activate/pause the log writer threads.
Definition: srv0srv.cc:253
srv_stage_alter_table_flush
PSI_stage_info srv_stage_alter_table_flush
Performance schema stage event for monitoring ALTER TABLE progress log_make_latest_checkpoint().
Definition: srv0srv.cc:769
srv_max_purge_lag_delay
ulong srv_max_purge_lag_delay
Max DML user threads delay in micro-seconds.
Definition: trx0purge.cc:69
consts::FILE
const std::string FILE("FILE")
export_var_t::innodb_page_size
ulint innodb_page_size
UNIV_PAGE_SIZE.
Definition: srv0srv.h:1155
export_var_t::innodb_buffer_pool_pages_free
ulint innodb_buffer_pool_pages_free
Free pages.
Definition: srv0srv.h:1134
srv_boot
void srv_boot(void)
Boots Innobase server.
Definition: srv0srv.cc:1231
srv_reset_io_thread_op_info
void srv_reset_io_thread_op_info()
Resets the info describing an i/o thread current state.
Definition: srv0srv.cc:845
srv_worker_thread
void srv_worker_thread()
Worker thread that reads tasks from the work queue and executes them.
Definition: srv0srv.cc:2905
export_var_t::innodb_buffer_pool_bytes_dirty
ulint innodb_buffer_pool_bytes_dirty
File bytes modified.
Definition: srv0srv.h:1132
srv_spin_wait_delay
ulong srv_spin_wait_delay
Definition: ut0mutex.h:107
export_var_t::innodb_data_fsyncs
ulint innodb_data_fsyncs
Number of fsyncs so far.
Definition: srv0srv.h:1118
srv_fatal_semaphore_wait_extend
std::atomic< int > srv_fatal_semaphore_wait_extend
Definition: srv0srv.cc:115
srv_buf_dump_filename
char * srv_buf_dump_filename
The buffer pool dump/load file name.
Definition: srv0srv.cc:748
srv_stats_method_name_t
enum srv_stats_method_name_enum srv_stats_method_name_t
Definition: srv0srv.h:931
Srv_threads::m_lock_wait_timeout
IB_thread m_lock_wait_timeout
Thread detecting lock wait timeouts.
Definition: srv0srv.h:199
export_var_t::innodb_log_write_requests
ulint innodb_log_write_requests
srv_log_write_requests
Definition: srv0srv.h:1149
Srv_threads::m_buf_dump
IB_thread m_buf_dump
Buffer pool dump thread.
Definition: srv0srv.h:190
IB_thread
Definition: os0thread.h:41
parallel_read_thread_key
mysql_pfs_key_t parallel_read_thread_key
export_var_t
Status variables to be passed to MySQL.
Definition: srv0srv.h:1114
Srv_threads::m_error_monitor
IB_thread m_error_monitor
Error monitor thread.
Definition: srv0srv.h:169
srv_stage_alter_table_end
PSI_stage_info srv_stage_alter_table_end
Performance schema stage event for monitoring ALTER TABLE progress everything after flush log_make_la...
Definition: srv0srv.cc:764
SRV_FORCE_NO_UNDO_LOG_SCAN
@ SRV_FORCE_NO_UNDO_LOG_SCAN
do not look at undo logs when starting the database: InnoDB will treat even incomplete transactions a...
Definition: srv0srv.h:912
page_flush_coordinator_thread_key
mysql_pfs_key_t page_flush_coordinator_thread_key
SRV_FORCE_NO_TRX_UNDO
@ SRV_FORCE_NO_TRX_UNDO
do not run trx rollback after recovery
Definition: srv0srv.h:907
srv_replication_delay
ulong srv_replication_delay
Definition: srv0srv.cc:545
srv_buf_pool_max_size
const longlong srv_buf_pool_max_size
Maximum pool size in bytes.
Definition: srv0srv.cc:390
srv_thread_delay_cleanup_if_needed
void srv_thread_delay_cleanup_if_needed(bool wait_for_signal)
Delay the thread after it discovered that the shutdown_state is greater or equal to SRV_SHUTDOWN_CLEA...
Definition: srv0start.cc:3494
export_var_t::innodb_log_waits
ulint innodb_log_waits
srv_log_waits
Definition: srv0srv.h:1148
export_var_t::innodb_rows_read
ulint innodb_rows_read
srv_n_rows_read
Definition: srv0srv.h:1169
srv_max_undo_tablespace_size
unsigned long long srv_max_undo_tablespace_size
Maximum size of undo tablespace.
Definition: srv0srv.cc:174
srv_idle_flush_pct_default
const ulong srv_idle_flush_pct_default
Default value of srv_idle_flush_pct.
Definition: srv0srv.cc:424
srv_set_io_thread_op_info
void srv_set_io_thread_op_info(ulint i, const char *str)
Sets the info describing an i/o thread current state.
Definition: srv0srv.cc:838
srv_lock_table_size
ulint srv_lock_table_size
Lock table size in bytes.
Definition: srv0srv.cc:422
Srv_threads::m_ts_alter_encrypt
IB_thread m_ts_alter_encrypt
The ts_alter_encrypt thread.
Definition: srv0srv.h:205
export_var_t::innodb_buffer_pool_pages_total
ulint innodb_buffer_pool_pages_total
Buffer pool size.
Definition: srv0srv.h:1128
srv_buf_pool_min_size
const ulint srv_buf_pool_min_size
Minimum pool size in bytes.
Definition: srv0srv.cc:386
srv_ts_alter_encrypt_thread_key
mysql_pfs_key_t srv_ts_alter_encrypt_thread_key
srv_stats_t::lint_ctr_1_t
ib_counter_t< lint, 1, single_indexer_t > lint_ctr_1_t
Definition: srv0srv.h:74
srv_lock_timeout_thread_key
mysql_pfs_key_t srv_lock_timeout_thread_key
srv_numa_interleave
bool srv_numa_interleave
Definition: srv0srv.cc:206
srv_use_native_aio
bool srv_use_native_aio
If this flag is true, then we will use the native aio of the OS (provided we compiled Innobase with i...
Definition: srv0srv.cc:204
srv_read_only_mode
bool srv_read_only_mode
Set if InnoDB must operate in read-only mode.
Definition: srv0srv.cc:184
srv_slot_t::suspended
bool suspended
TRUE if the thread is waiting for the event of this slot.
Definition: srv0srv.h:1209
srv_stats_t
Definition: srv0srv.h:70
os0event.h
srv_stats_t::int64_ctr_1_t
ib_counter_t< int64_t, 1, single_indexer_t > int64_ctr_1_t
Definition: srv0srv.h:75
srv_n_free_tickets_to_enter
ulong srv_n_free_tickets_to_enter
Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got t...
Definition: srv0conc.cc:59
srv_redo_log
bool srv_redo_log
If innodb redo logging is enabled.
Definition: srv0srv.cc:514
log0ddl.h
srv_check_activity
ibool srv_check_activity(ulint old_activity_count)
Check if there has been any activity.
Definition: srv0srv.cc:1936
Srv_cpu_usage::utime_abs
double utime_abs
Definition: srv0srv.h:280
srv_print_innodb_lock_monitor
bool srv_print_innodb_lock_monitor
Definition: srv0srv.cc:567
CONCURRENT_UNDO_TRUNCATE_LIMIT
const size_t CONCURRENT_UNDO_TRUNCATE_LIMIT
Maximum number of recently truncated undo tablespace IDs for the same undo number.
Definition: srv0srv.cc:178
srv_print_all_deadlocks
bool srv_print_all_deadlocks
Print all user-level transactions deadlocks to mysqld stderr.
Definition: srv0srv.cc:505
srv_priority_boost
ibool srv_priority_boost
Definition: srv0srv.cc:550
export_var_t::innodb_pages_read
ulint innodb_pages_read
buf_pool->stat.n_pages_read
Definition: srv0srv.h:1157
srv_thread_sleep_delay
ulong srv_thread_sleep_delay
Sleep delay for threads waiting to enter InnoDB.
Definition: srv0conc.cc:64
srv_max_n_open_files
ulint srv_max_n_open_files
Definition: srv0srv.cc:449
srv_idle_flush_pct
ulong srv_idle_flush_pct
How much flush to be done in case of server is idle.
Definition: srv0srv.cc:425
log_archiver_thread_key
mysql_pfs_key_t log_archiver_thread_key
srv_monitor_file_mutex
ib_mutex_t srv_monitor_file_mutex
Definition: srv0srv.cc:585
srv_buffer_pool_load_at_startup
bool srv_buffer_pool_load_at_startup
Definition: srv0srv.cc:753
srv_main_thread_op_info
const char * srv_main_thread_op_info
Definition: srv0srv.cc:121
srv_buf_pool_def_size
const ulint srv_buf_pool_def_size
Default pool size in bytes.
Definition: srv0srv.cc:388
srv_dedicated_server
bool srv_dedicated_server
Dedicated server setting.
Definition: srv0srv.cc:382
export_var_t::innodb_buffer_pool_write_requests
ulint innodb_buffer_pool_write_requests
srv_buf_pool_write_requests
Definition: srv0srv.h:1142
srv_print_ddl_logs
bool srv_print_ddl_logs
Print all DDL logs to mysqld stderr.
Definition: srv0srv.cc:508
srv_n_write_io_threads
ulong srv_n_write_io_threads
Definition: srv0srv.cc:430
Srv_threads::m_page_cleaner_workers
IB_thread * m_page_cleaner_workers
Page cleaner workers.
Definition: srv0srv.h:231
export_var_t::innodb_purge_trx_id_age
ulint innodb_purge_trx_id_age
rw_max_trx_no - purged trx_no
Definition: srv0srv.h:1190
srv_cmp_per_index_enabled
bool srv_cmp_per_index_enabled
Enable INFORMATION_SCHEMA.innodb_cmp_per_index.
Definition: srv0srv.cc:511
srv_get_task_queue_length
ulint srv_get_task_queue_length(void)
Get count of tasks in the queue.
Definition: srv0srv.cc:3293
SRV_PURGE
@ SRV_PURGE
Purge coordinator thread.
Definition: srv0srv.h:944
export_var_t::innodb_buffer_pool_read_requests
ulint innodb_buffer_pool_read_requests
buf_pool->stat.n_page_gets
Definition: srv0srv.h:1138
Srv_threads::m_log_writer
IB_thread m_log_writer
Redo writer thread.
Definition: srv0srv.h:175
srv_slot_t::reservation_no
uint64_t reservation_no
Stores the current value of lock_wait_table_reservations, when lock_wait_table_reserve_slot is called...
Definition: srv0srv.h:1223
export_var_t::innodb_system_rows_deleted
ulint innodb_system_rows_deleted
srv_n_system_rows_deleted
Definition: srv0srv.h:1176
srv_parallel_read_threads
ulong srv_parallel_read_threads
Number of threads to use for parallel reads.
Definition: srv0srv.cc:199
file
Definition: os0file.h:85
Srv_threads::m_page_cleaner_workers_n
size_t m_page_cleaner_workers_n
Number of page cleaner workers and size of array below.
Definition: srv0srv.h:227
srv_stage_alter_tablespace_encryption
PSI_stage_info srv_stage_alter_tablespace_encryption
Performance schema stage event for monitoring ALTER TABLESPACE ENCRYPTION progress.
Definition: srv0srv.cc:802
export_var_t::innodb_undo_tablespaces_total
ulint innodb_undo_tablespaces_total
total number of undo tablespaces innoDB is tracking.
Definition: srv0srv.h:1181
srv_log_file_size_requested
ulonglong srv_log_file_size_requested
The value of the startup parameter innodb_log_file_size.
Definition: srv0srv.cc:242
srv_n_spin_wait_rounds
ulong srv_n_spin_wait_rounds
Definition: ut0mutex.h:108
srv_stats_t::buf_pool_wait_free
ulint_ctr_1_t buf_pool_wait_free
Store the number of times when we had to wait for a free page in the buffer pool.
Definition: srv0srv.h:109
io_handler_thread_key
mysql_pfs_key_t io_handler_thread_key
srv_io_thread_op_info
const char * srv_io_thread_op_info[]
Definition: srv0srv.cc:572
srv_slot_t::wait_timeout
ulong wait_timeout
Wait time that if exceeded the thread will be timed out.
Definition: srv0srv.h:1227
srv_force_recovery_crash
ulong srv_force_recovery_crash
Inject a crash at different steps of the recovery process.
Definition: srv0srv.cc:501
export_var_t::innodb_data_reads
ulint innodb_data_reads
I/O read requests.
Definition: srv0srv.h:1122
srv_fatal_semaphore_wait_threshold
ulong srv_fatal_semaphore_wait_threshold
Definition: srv0srv.cc:114
fil0fil.h
Srv_threads::m_purge_coordinator
IB_thread m_purge_coordinator
Purge coordinator (also being a worker)
Definition: srv0srv.h:214
srv_worker_thread_key
mysql_pfs_key_t srv_worker_thread_key
srv_buf_pool_old_size
ulint srv_buf_pool_old_size
Previously requested size.
Definition: srv0srv.cc:414
Srv_threads::m_shutdown_cleanup_dbg
os_event_t m_shutdown_cleanup_dbg
Used in test scenario to delay threads' cleanup until the pre_dd_shutdown is ended and final plugin's...
Definition: srv0srv.h:250
srv_log_file_size
ulonglong srv_log_file_size
At startup, this is the current redo log file size.
Definition: srv0srv.cc:239
srv_slot_t::in_use
bool in_use
TRUE if this slot is in use.
Definition: srv0srv.h:1206
space_id_t
uint32 space_id_t
Tablespace identifier.
Definition: api0api.h:59
Srv_threads::m_trx_recovery_rollback
IB_thread m_trx_recovery_rollback
Thread doing rollbacks during recovery.
Definition: srv0srv.h:208
srv_is_upgrade_mode
bool srv_is_upgrade_mode
srv_fast_shutdown
ulong srv_fast_shutdown
The value of the configuration parameter innodb_fast_shutdown, controlling the InnoDB shutdown.
Definition: srv0srv.cc:528
srv_purge_rseg_truncate_frequency
ulong srv_purge_rseg_truncate_frequency
Rate at which UNDO records should be purged.
Definition: srv0srv.cc:159
export_var_t::innodb_undo_tablespaces_explicit
ulint innodb_undo_tablespaces_explicit
number of undo tablespaces the dba created explicitly.
Definition: srv0srv.h:1185
buf0checksum.h
srv_log_flush_notifier_timeout
ulong srv_log_flush_notifier_timeout
Initial timeout used to wait on flush_notifier_event.
Definition: srv0srv.cc:341
mysql_stage.h
export_var_t::innodb_buffer_pool_read_ahead
ulint innodb_buffer_pool_read_ahead
srv_read_ahead
Definition: srv0srv.h:1144
ulonglong
unsigned long long int ulonglong
Definition: my_inttypes.h:55
export_var_t::innodb_os_log_pending_writes
ulint innodb_os_log_pending_writes
srv_os_log_pending_writes
Definition: srv0srv.h:1153
OS_FILE_MAX_PATH
#define OS_FILE_MAX_PATH
Definition: os0file.h:703
export_var_t::innodb_buffer_pool_read_ahead_evicted
ulint innodb_buffer_pool_read_ahead_evicted
srv_read_ahead evicted
Definition: srv0srv.h:1145
srv_log_buffer_size
ulong srv_log_buffer_size
Space for log buffer, expressed in bytes.
Definition: srv0srv.cc:247
srv_stage_clone_file_copy
PSI_stage_info srv_stage_clone_file_copy
Performance schema stage event for monitoring clone file copy progress.
Definition: srv0srv.cc:812
export_var_t::innodb_buffer_pool_pages_misc
ulint innodb_buffer_pool_pages_misc
Miscellanous pages.
Definition: srv0srv.h:1133
srv_log_wait_for_flush_timeout
ulong srv_log_wait_for_flush_timeout
Timeout used when waiting for redo flush (microseconds).
Definition: srv0srv.cc:304
srv_buffer_pool_dump_at_shutdown
bool srv_buffer_pool_dump_at_shutdown
Boolean config knobs that tell InnoDB to dump the buffer pool at shutdown and/or load it during start...
Definition: srv0srv.cc:752
export_var_t::innodb_data_pending_reads
ulint innodb_data_pending_reads
Pending reads.
Definition: srv0srv.h:1115
srv_n_read_io_threads
ulong srv_n_read_io_threads
Definition: srv0srv.cc:429
srv_master_thread
void srv_master_thread()
The master thread controlling the server.
Definition: srv0srv.cc:2810
log_checkpointer_thread_key
mysql_pfs_key_t log_checkpointer_thread_key
srv_slot_t
Thread slot in the thread table.
Definition: srv0srv.h:1201
export_var_t::innodb_dblwr_writes
ulint innodb_dblwr_writes
srv_dblwr_writes
Definition: srv0srv.h:1147
export_var_t::innodb_buffer_pool_bytes_data
ulint innodb_buffer_pool_bytes_data
File bytes used.
Definition: srv0srv.h:1130
srv_log_write_max_size
ulong srv_log_write_max_size
When log writer follows links in the log recent written buffer, it stops when it has reached at least...
Definition: srv0srv.cc:271
export_var_t::innodb_system_rows_updated
ulint innodb_system_rows_updated
srv_n_system_rows_updated
Definition: srv0srv.h:1175
srv_max_dirty_pages_pct_lwm
double srv_max_dirty_pages_pct_lwm
Definition: srv0srv.cc:464
srv_log_spin_cpu_abs_lwm
uint srv_log_spin_cpu_abs_lwm
Minimum absolute value of cpu time for which spin-delay is used.
Definition: srv0srv.cc:256
srv_log_flush_notifier_spin_delay
ulong srv_log_flush_notifier_spin_delay
Number of spin iterations, for which log flush notifier thread is waiting for advanced flushed_to_dis...
Definition: srv0srv.cc:337
fts_parallel_tokenization_thread_key
mysql_pfs_key_t fts_parallel_tokenization_thread_key
srv_undo_tablespaces
ulong srv_undo_tablespaces
Number of undo tablespaces to use.
Definition: srv0srv.cc:143
srv_stage_alter_table_log_table
PSI_stage_info srv_stage_alter_table_log_table
Performance schema stage event for monitoring ALTER TABLE progress row_log_table_apply().
Definition: srv0srv.cc:785
SRV_FORCE_NO_LOG_REDO
@ SRV_FORCE_NO_LOG_REDO
do not do the log roll-forward in connection with recovery
Definition: srv0srv.h:916
srv_log_checksums
bool srv_log_checksums
Whether to generate and require checksums on the redo log pages.
Definition: srv0srv.cc:347
srv_purge_view_update_only_debug
bool srv_purge_view_update_only_debug
Definition: trx0purge.cc:82
que_thr_t
Definition: que0que.h:251
export_var_t::innodb_buffer_pool_pages_latched
ulint innodb_buffer_pool_pages_latched
Latched pages.
Definition: srv0srv.h:1136
binary_log::transaction::compression::type
type
Definition: base.h:36
srv_log_flusher_spin_delay
ulong srv_log_flusher_spin_delay
Number of spin iterations, for which log flusher thread is waiting for new data to flush,...
Definition: srv0srv.cc:321
export_var_t::innodb_pages_created
ulint innodb_pages_created
buf_pool->stat.n_pages_created
Definition: srv0srv.h:1156
srv_random_read_ahead
bool srv_random_read_ahead
Definition: srv0srv.cc:433
srv_stats_persistent_sample_pages
unsigned long long srv_stats_persistent_sample_pages
Definition: srv0srv.cc:542
srv_file_per_table
bool srv_file_per_table
store to its own file each table created by an user; data dictionary tables are in the system tablesp...
Definition: srv0srv.cc:188
export_var_t::innodb_undo_tablespaces_implicit
ulint innodb_undo_tablespaces_implicit
number of undo tablespaces innoDB created implicitly.
Definition: srv0srv.h:1183
srv_buf_pool_curr_size
long long srv_buf_pool_curr_size
Current size in bytes.
Definition: srv0srv.cc:418
srv_thread_type
srv_thread_type
Types of threads existing in the system.
Definition: srv0srv.h:939
ib_time_monotonic_t
int64_t ib_time_monotonic_t
Time stamp read from the monotonic clock (returned by ut_time_monotonic()).
Definition: ut0ut.h:89
srv_sort_buf_size
ulong srv_sort_buf_size
Sort buffer size in index creation.
Definition: srv0srv.cc:191
srv_misc_tmpfile
FILE * srv_misc_tmpfile
Temporary file for miscellanous diagnostic output.
Definition: srv0srv.cc:594
srv_stats_t::data_read
ulint_ctr_1_t data_read
Number of data read in total (in bytes)
Definition: srv0srv.h:120
srv_monitor_file
FILE * srv_monitor_file
Temporary file for innodb monitor output.
Definition: srv0srv.cc:588
srv_n_purge_threads
ulong srv_n_purge_threads
Definition: srv0srv.cc:474
srv_stage_alter_table_read_pk_internal_sort
PSI_stage_info srv_stage_alter_table_read_pk_internal_sort
Performance schema stage event for monitoring ALTER TABLE progress row_merge_read_clustered_index().
Definition: srv0srv.cc:796
srv_buf_pool_dump_pct
ulong srv_buf_pool_dump_pct
Dump this % of each buffer pool during BP dump.
Definition: srv0srv.cc:420
srv_log_wait_for_flush_spin_hwm
ulong srv_log_wait_for_flush_spin_hwm
Maximum value of average log flush time for which spin-delay is used.
Definition: srv0srv.cc:264
Srv_threads::m_log_checkpointer
IB_thread m_log_checkpointer
Redo checkpointer thread.
Definition: srv0srv.h:172
srv_innodb_stats_method
ulong srv_innodb_stats_method
Definition: srv0srv.cc:482
export_var_t::innodb_data_writes
ulint innodb_data_writes
I/O write requests.
Definition: srv0srv.h:1120
srv_stats_t::n_sampled_pages_skipped
ulint_ctr_64_t n_sampled_pages_skipped
Number of sampled pages skipped.
Definition: srv0srv.h:159
Srv_threads::m_log_archiver
IB_thread m_log_archiver
Archiver's log archiver (used by Clone).
Definition: srv0srv.h:234
srv_get_activity_count
ulint srv_get_activity_count(void)
Get current server activity count.
Definition: srv0srv.cc:1930
srv_stats_persistent
bool srv_stats_persistent
Definition: srv0srv.cc:540
srv_stats_t::n_rows_updated
ulint_ctr_64_t n_rows_updated
Number of rows updated.
Definition: srv0srv.h:135
srv_slot_t::event
os_event_t event
Event used in suspending the thread when it has nothing to do.
Definition: srv0srv.h:1230
srv_purge_batch_size
ulong srv_purge_batch_size
Definition: srv0srv.cc:477
SRV_NONE
@ SRV_NONE
None.
Definition: srv0srv.h:940
export_var_t::innodb_rows_inserted
ulint innodb_rows_inserted
srv_n_rows_inserted
Definition: srv0srv.h:1170
ut0counter.h
export_var_t::innodb_row_lock_time
int64_t innodb_row_lock_time
srv_n_lock_wait_time / 1000
Definition: srv0srv.h:1162
srv_master_thread_key
mysql_pfs_key_t srv_master_thread_key
srv_release_threads
ulint srv_release_threads(enum srv_thread_type type, ulint n)
Releases threads of the type given from suspension in the thread table.
Definition: srv0srv.cc:987
export_vars
struct export_var_t export_vars
Status variables to be passed to MySQL.
Definition: srv0srv.cc:491
ib_counter_t< ulint, 64 >
srv_stats
srv_stats_t srv_stats
Global counters.
Definition: srv0srv.cc:487
srv_buf_pool_size
ulint srv_buf_pool_size
Requested size in bytes.
Definition: srv0srv.cc:384
srv_stats_t::os_log_written
lsn_ctr_1_t os_log_written
Amount of data written to the log files in bytes.
Definition: srv0srv.h:87
export_var_t::innodb_log_writes
ulint innodb_log_writes
srv_log_writes
Definition: srv0srv.h:1150
SRV_UNIX_O_DIRECT_NO_FSYNC
@ SRV_UNIX_O_DIRECT_NO_FSYNC
do not use fsync() when using direct IO i.e.
Definition: srv0srv.h:865
srv_checkpoint_disabled
bool srv_checkpoint_disabled
If true then disable checkpointing.
Definition: srv0srv.cc:351