1
/*****************************************************************************
3
Copyright (C) 1995, 2010, Innobase Oy. All Rights Reserved.
4
Copyright (C) 2008, 2009, Google Inc.
5
Copyright (C) 2009, Percona Inc.
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.
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
20
This program is free software; you can redistribute it and/or modify it under
21
the terms of the GNU General Public License as published by the Free Software
22
Foundation; version 2 of the License.
24
This program is distributed in the hope that it will be useful, but WITHOUT
25
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
26
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
28
You should have received a copy of the GNU General Public License along with
29
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
30
St, Fifth Floor, Boston, MA 02110-1301 USA
32
*****************************************************************************/
34
/**************************************************//**
35
@file include/srv0srv.h
1
/******************************************************
36
2
The server main program
38
6
Created 10/10/1995 Heikki Tuuri
39
7
*******************************************************/
45
#ifndef UNIV_HOTBACKUP
46
14
#include "sync0sync.h"
47
15
#include "os0sync.h"
48
16
#include "que0types.h"
49
17
#include "trx0types.h"
53
19
extern const char* srv_main_thread_op_info;
55
/** Prefix used by MySQL to indicate pre-5.1 table name encoding */
56
/** LOOKIE HERE!!!! This used to be srv_mysql50_table_name_prefix[10]
57
which was a buffer overrun, because it didn't allow for the trailing
59
static const std::string srv_mysql50_table_name_prefix("#mysql50#");
21
/* Prefix used by MySQL to indicate pre-5.1 table name encoding */
22
extern const char srv_mysql50_table_name_prefix[9];
61
24
/* When this event is set the lock timeout and InnoDB monitor
62
25
thread starts running */
63
26
extern os_event_t srv_lock_timeout_thread_event;
65
/* The monitor thread waits on this event. */
66
extern os_event_t srv_monitor_event;
68
/* The lock timeout thread waits on this event. */
69
extern os_event_t srv_timeout_event;
71
/* The error monitor thread waits on this event. */
72
extern os_event_t srv_error_event;
74
28
/* If the last data file is auto-extended, we add this many pages to it
76
30
#define SRV_AUTO_EXTEND_INCREMENT \
137
76
extern ibool srv_auto_extend_last_data_file;
138
77
extern ulint srv_last_file_size_max;
78
extern ulong srv_auto_extend_increment;
80
extern ibool srv_created_new_raw;
139
85
extern char** srv_log_group_home_dirs;
140
#ifndef UNIV_HOTBACKUP
141
extern unsigned int srv_auto_extend_increment;
143
extern ibool srv_created_new_raw;
145
87
extern ulint srv_n_log_groups;
146
88
extern ulint srv_n_log_files;
147
89
extern ulint srv_log_file_size;
148
90
extern ulint srv_log_buffer_size;
149
91
extern ulong srv_flush_log_at_trx_commit;
150
extern bool srv_adaptive_flushing;
153
93
/* The sort order table of the MySQL latin1_swedish_ci character set
155
#if defined(BUILD_DRIZZLE)
156
95
extern const byte srv_latin1_ordering[256];
157
extern bool srv_use_sys_malloc;
159
extern const byte* srv_latin1_ordering;
160
# ifndef UNIV_HOTBACKUP
161
extern my_bool srv_use_sys_malloc;
163
extern ibool srv_use_sys_malloc;
164
# endif /* UNIV_HOTBACKUP */
165
#endif /* BUILD_DRIZZLE */
166
extern ulint srv_buf_pool_size; /*!< requested size in bytes */
167
extern ulint srv_buf_pool_instances; /*!< requested number of buffer pool instances */
168
extern ulint srv_buf_pool_old_size; /*!< previously requested size */
169
extern ulint srv_buf_pool_curr_size; /*!< current size in bytes */
96
extern ulong srv_buf_pool_size; /* requested size in bytes */
97
extern ulong srv_buf_pool_old_size; /* previously requested size */
98
extern ulong srv_buf_pool_curr_size; /* current size in bytes */
170
99
extern ulint srv_mem_pool_size;
171
100
extern ulint srv_lock_table_size;
173
102
extern ulint srv_n_file_io_threads;
174
extern ulong srv_read_ahead_threshold;
175
extern ulint srv_n_read_io_threads;
176
extern ulint srv_n_write_io_threads;
178
/* Number of IO operations per second the server can do */
179
extern ulong srv_io_capacity;
180
/* Returns the number of IO operations that is X percent of the
181
capacity. PCT_IO(5) -> returns the number of IO operations that
182
is 5% of the max where max is srv_io_capacity. */
183
#define PCT_IO(p) ((ulong) (srv_io_capacity * ((double) p / 100.0)))
185
104
#ifdef UNIV_LOG_ARCHIVE
186
extern ibool srv_log_archive_on;
187
extern ibool srv_archive_recovery;
188
extern ib_uint64_t srv_archive_recovery_limit_lsn;
105
extern ibool srv_log_archive_on;
106
extern ibool srv_archive_recovery;
107
extern dulint srv_archive_recovery_limit_lsn;
189
108
#endif /* UNIV_LOG_ARCHIVE */
191
110
extern char* srv_file_flush_method_str;
328
240
buffer pool to disk */
329
241
extern ulint srv_buf_pool_flushed;
331
/** Number of buffer pool reads that led to the
243
/* variable to count the number of buffer pool reads that led to the
332
244
reading of a disk page */
333
245
extern ulint srv_buf_pool_reads;
335
/** Status variables to be passed to MySQL */
247
/* variable to count the number of sequential read-aheads were done */
248
extern ulint srv_read_ahead_seq;
250
/* variable to count the number of random read-aheads were done */
251
extern ulint srv_read_ahead_rnd;
253
/* In this structure we store status variables to be passed to MySQL */
336
254
typedef struct export_var_struct export_struc;
338
/** Status variables to be passed to MySQL */
339
256
extern export_struc export_vars;
341
/** The server system */
342
258
typedef struct srv_sys_struct srv_sys_t;
344
/** The server system */
260
/* The server system */
345
261
extern srv_sys_t* srv_sys;
347
# ifdef UNIV_PFS_THREAD
348
/* Keys to register InnoDB threads with performance schema */
349
extern mysql_pfs_key_t trx_rollback_clean_thread_key;
350
extern mysql_pfs_key_t io_handler_thread_key;
351
extern mysql_pfs_key_t srv_lock_timeout_thread_key;
352
extern mysql_pfs_key_t srv_error_monitor_thread_key;
353
extern mysql_pfs_key_t srv_monitor_thread_key;
354
extern mysql_pfs_key_t srv_master_thread_key;
356
/* This macro register the current thread and its key with performance
358
# define pfs_register_thread(key) \
361
struct PSI_thread* psi = PSI_server->new_thread(key, NULL, 0);\
363
PSI_server->set_thread(psi); \
368
/* This macro delist the current thread from performance schema */
369
# define pfs_delete_thread() \
372
PSI_server->delete_current_thread(); \
375
# endif /* UNIV_PFS_THREAD */
377
#endif /* !UNIV_HOTBACKUP */
379
/** Types of raw partitions in innodb_data_file_path */
381
SRV_NOT_RAW = 0, /*!< Not a raw partition */
382
SRV_NEW_RAW, /*!< A 'newraw' partition, only to be
384
SRV_OLD_RAW /*!< An initialized raw partition */
387
/** Alternatives for the file flush option in Unix; see the InnoDB manual
263
/* Alternatives for the file flush option in Unix; see the InnoDB manual
388
264
about what these mean */
390
SRV_UNIX_FSYNC = 1, /*!< fsync, the default */
391
SRV_UNIX_O_DSYNC, /*!< open log files in O_SYNC mode */
392
SRV_UNIX_LITTLESYNC, /*!< do not call os_file_flush()
393
when writing data files, but do flush
394
after writing to log files */
395
SRV_UNIX_NOSYNC, /*!< do not flush after writing */
396
SRV_UNIX_O_DIRECT /*!< invoke os_file_set_nocache() on
400
/** Alternatives for file i/o in Windows */
402
SRV_WIN_IO_NORMAL = 1, /*!< buffered I/O */
403
SRV_WIN_IO_UNBUFFERED /*!< unbuffered I/O; this is the default */
406
/** Alternatives for srv_force_recovery. Non-zero values are intended
265
#define SRV_UNIX_FSYNC 1 /* This is the default */
266
#define SRV_UNIX_O_DSYNC 2
267
#define SRV_UNIX_LITTLESYNC 3
268
#define SRV_UNIX_NOSYNC 4
269
#define SRV_UNIX_O_DIRECT 5
271
/* Alternatives for file i/o in Windows */
272
#define SRV_WIN_IO_NORMAL 1
273
#define SRV_WIN_IO_UNBUFFERED 2 /* This is the default */
275
/* Alternatives for srv_force_recovery. Non-zero values are intended
407
276
to help the user get a damaged database up so that he can dump intact
408
277
tables and rows with SELECT INTO OUTFILE. The database must not otherwise
409
278
be used with these options! A bigger number below means that all precautions
410
279
of lower numbers are included. */
412
SRV_FORCE_IGNORE_CORRUPT = 1, /*!< let the server run even if it
281
#define SRV_FORCE_IGNORE_CORRUPT 1 /* let the server run even if it
413
282
detects a corrupt page */
414
SRV_FORCE_NO_BACKGROUND = 2, /*!< prevent the main thread from
283
#define SRV_FORCE_NO_BACKGROUND 2 /* prevent the main thread from
415
284
running: if a crash would occur
416
285
in purge, this prevents it */
417
SRV_FORCE_NO_TRX_UNDO = 3, /*!< do not run trx rollback after
286
#define SRV_FORCE_NO_TRX_UNDO 3 /* do not run trx rollback after
419
SRV_FORCE_NO_IBUF_MERGE = 4, /*!< prevent also ibuf operations:
288
#define SRV_FORCE_NO_IBUF_MERGE 4 /* prevent also ibuf operations:
420
289
if they would cause a crash, better
422
SRV_FORCE_NO_UNDO_LOG_SCAN = 5, /*!< do not look at undo logs when
291
#define SRV_FORCE_NO_UNDO_LOG_SCAN 5 /* do not look at undo logs when
423
292
starting the database: InnoDB will
424
293
treat even incomplete transactions
426
SRV_FORCE_NO_LOG_REDO = 6 /*!< do not do the log roll-forward
295
#define SRV_FORCE_NO_LOG_REDO 6 /* do not do the log roll-forward
427
296
in connection with recovery */
430
#ifndef UNIV_HOTBACKUP
431
298
/** Types of threads existing in the system. */
432
299
enum srv_thread_type {
433
300
SRV_COM = 1, /**< threads serving communication and queries */
447
/*********************************************************************//**
448
Boots Innobase server.
449
@return DB_SUCCESS or error code */
314
/*************************************************************************
315
Boots Innobase server. */
454
/*********************************************************************//**
320
/* out: DB_SUCCESS or error code */
321
/*************************************************************************
455
322
Initializes the server. */
460
/*********************************************************************//**
461
Frees the data structures created in srv_init(). */
327
/*************************************************************************
328
Frees the OS fast mutex created in srv_boot(). */
466
/*********************************************************************//**
333
/*************************************************************************
467
334
Initializes the synchronization primitives, memory system, and the thread
468
335
local storage. */
471
338
srv_general_init(void);
472
339
/*==================*/
473
/*********************************************************************//**
474
Gets the number of threads in the system.
475
@return sum of srv_n_threads[] */
340
/*************************************************************************
341
Gets the number of threads in the system. */
478
344
srv_get_n_threads(void);
479
345
/*===================*/
480
/*********************************************************************//**
481
Returns the calling thread type.
482
@return SRV_COM, ... */
346
/*************************************************************************
347
Returns the calling thread type. */
484
349
enum srv_thread_type
485
350
srv_get_thread_type(void);
486
351
/*=====================*/
487
/*********************************************************************//**
352
/* out: SRV_COM, ... */
353
/*************************************************************************
488
354
Sets the info describing an i/o thread current state. */
491
357
srv_set_io_thread_op_info(
492
358
/*======================*/
493
ulint i, /*!< in: the 'segment' of the i/o thread */
494
const char* str); /*!< in: constant char string describing the
359
ulint i, /* in: the 'segment' of the i/o thread */
360
const char* str); /* in: constant char string describing the
496
/*********************************************************************//**
362
/*************************************************************************
497
363
Releases threads of the type given from suspension in the thread table.
498
NOTE! The server mutex has to be reserved by the caller!
499
@return number of threads released: this may be less than n if not
500
enough threads were suspended at the moment */
364
NOTE! The server mutex has to be reserved by the caller! */
503
367
srv_release_threads(
504
368
/*================*/
505
enum srv_thread_type type, /*!< in: thread type */
506
ulint n); /*!< in: number of threads to release */
507
/*********************************************************************//**
508
The master thread controlling the server.
509
@return a dummy parameter */
369
/* out: number of threads
370
released: this may be < n if
371
not enough threads were
372
suspended at the moment */
373
enum srv_thread_type type, /* in: thread type */
374
ulint n); /* in: number of threads to release */
375
/*************************************************************************
376
The master thread controlling the server. */
512
379
srv_master_thread(
513
380
/*==============*/
514
void* arg); /*!< in: a dummy parameter required by
381
/* out: a dummy parameter */
382
void* arg); /* in: a dummy parameter required by
515
383
os_thread_create */
516
/*******************************************************************//**
517
Wakes up the purge thread if it's not already awake. */
520
srv_wake_purge_thread(void);
521
/*=======================*/
522
/*******************************************************************//**
384
/***********************************************************************
523
385
Tells the Innobase server that there has been activity in the database
524
386
and wakes up the master thread if it is suspended (not sleeping). Used
525
387
in the MySQL interface. Note that there is a small chance that the master
530
392
srv_active_wake_master_thread(void);
531
393
/*===============================*/
532
/*******************************************************************//**
394
/***********************************************************************
533
395
Wakes up the master thread if it is suspended or being suspended. */
536
398
srv_wake_master_thread(void);
537
399
/*========================*/
538
/*******************************************************************//**
539
Tells the purge thread that there has been activity in the database
540
and wakes up the purge thread if it is suspended (not sleeping). Note
541
that there is a small chance that the purge thread stays suspended
542
(we do not protect our operation with the kernel mutex, for
543
performace reasons). */
546
srv_wake_purge_thread_if_not_active(void);
547
/*=====================================*/
548
/*********************************************************************//**
400
/*************************************************************************
549
401
Puts an OS thread to wait if there are too many concurrent threads
550
402
(>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. */
553
405
srv_conc_enter_innodb(
554
406
/*==================*/
555
trx_t* trx); /*!< in: transaction object associated with the
407
trx_t* trx); /* in: transaction object associated with the
557
/*********************************************************************//**
409
/*************************************************************************
558
410
This lets a thread enter InnoDB regardless of the number of threads inside
559
411
InnoDB. This must be called when a thread ends a lock wait. */
562
414
srv_conc_force_enter_innodb(
563
415
/*========================*/
564
trx_t* trx); /*!< in: transaction object associated with the
416
trx_t* trx); /* in: transaction object associated with the
566
/*********************************************************************//**
418
/*************************************************************************
567
419
This must be called when a thread exits InnoDB in a lock wait or at the
568
420
end of an SQL statement. */
571
423
srv_conc_force_exit_innodb(
572
424
/*=======================*/
573
trx_t* trx); /*!< in: transaction object associated with the
425
trx_t* trx); /* in: transaction object associated with the
575
/*********************************************************************//**
427
/*************************************************************************
576
428
This must be called when a thread exits InnoDB. */
579
431
srv_conc_exit_innodb(
580
432
/*=================*/
581
trx_t* trx); /*!< in: transaction object associated with the
433
trx_t* trx); /* in: transaction object associated with the
583
/***************************************************************//**
435
/*******************************************************************
584
436
Puts a MySQL OS thread to wait for a lock to be released. If an error
585
437
occurs during the wait trx->error_state associated with thr is
586
438
!= DB_SUCCESS when we return. DB_LOCK_WAIT_TIMEOUT and DB_DEADLOCK
591
443
srv_suspend_mysql_thread(
592
444
/*=====================*/
593
que_thr_t* thr); /*!< in: query thread associated with the MySQL
445
que_thr_t* thr); /* in: query thread associated with the MySQL
595
/********************************************************************//**
447
/************************************************************************
596
448
Releases a MySQL OS thread waiting for a lock to be released, if the
597
449
thread is already suspended. */
600
452
srv_release_mysql_thread_if_suspended(
601
453
/*==================================*/
602
que_thr_t* thr); /*!< in: query thread associated with the
454
que_thr_t* thr); /* in: query thread associated with the
603
455
MySQL OS thread */
604
/*********************************************************************//**
456
/*************************************************************************
605
457
A thread which wakes up threads whose lock wait may have lasted too long.
606
@return a dummy parameter */
609
srv_lock_timeout_thread(
610
/*====================*/
611
void* arg); /*!< in: a dummy parameter required by
613
/*********************************************************************//**
614
A thread which prints the info output by various InnoDB monitors.
615
@return a dummy parameter */
620
void* arg); /*!< in: a dummy parameter required by
458
This also prints the info output by various InnoDB monitors. */
461
srv_lock_timeout_and_monitor_thread(
462
/*================================*/
463
/* out: a dummy parameter */
464
void* arg); /* in: a dummy parameter required by
621
465
os_thread_create */
622
466
/*************************************************************************
623
467
A thread which prints warnings about semaphore waits which have lasted
624
too long. These can be used to track bugs which cause hangs.
625
@return a dummy parameter */
468
too long. These can be used to track bugs which cause hangs. */
628
471
srv_error_monitor_thread(
629
472
/*=====================*/
630
void* arg); /*!< in: a dummy parameter required by
473
/* out: a dummy parameter */
474
void* arg); /* in: a dummy parameter required by
631
475
os_thread_create */
632
/******************************************************************//**
633
Outputs to a file the output of the InnoDB Monitor.
634
@return FALSE if not all information printed
635
due to failure to obtain necessary mutex */
476
/**********************************************************************
477
Outputs to a file the output of the InnoDB Monitor. */
638
480
srv_printf_innodb_monitor(
639
481
/*======================*/
640
FILE* file, /*!< in: output stream */
641
ibool nowait, /*!< in: whether to wait for kernel mutex */
642
ulint* trx_start, /*!< out: file position of the start of
482
FILE* file, /* in: output stream */
483
ulint* trx_start, /* out: file position of the start of
643
484
the list of active transactions */
644
ulint* trx_end); /*!< out: file position of the end of
485
ulint* trx_end); /* out: file position of the end of
645
486
the list of active transactions */
647
/******************************************************************//**
488
/**********************************************************************
648
489
Function to pass InnoDB status variables to MySQL */
651
492
srv_export_innodb_status(void);
652
/*==========================*/
654
/******************************************************************//**
655
Increment the server activity counter. */
658
srv_inc_activity_count(void);
659
/*=========================*/
661
/*********************************************************************//**
662
Asynchronous purge thread.
663
@return a dummy parameter */
668
void* /*arg __attribute__((unused))*/); /*!< in: a dummy parameter
669
required by os_thread_create */
671
/**********************************************************************//**
672
Enqueues a task to server task queue and releases a worker thread, if there
673
is a suspended one. */
676
srv_que_task_enqueue_low(
677
493
/*=====================*/
678
que_thr_t* thr); /*!< in: query thread */
680
/**********************************************************************//**
681
Check whether any background thread is active.
682
@return FALSE if all are are suspended or have exited. */
685
srv_is_any_background_thread_active(void);
686
/*======================================*/
688
/** Status variables to be passed to MySQL */
689
struct export_var_struct{
690
ulint innodb_data_pending_reads; /*!< Pending reads */
691
ulint innodb_data_pending_writes; /*!< Pending writes */
692
ulint innodb_data_pending_fsyncs; /*!< Pending fsyncs */
693
ulint innodb_data_fsyncs; /*!< Number of fsyncs so far */
694
ulint innodb_data_read; /*!< Data bytes read */
695
ulint innodb_data_writes; /*!< I/O write requests */
696
ulint innodb_data_written; /*!< Data bytes written */
697
ulint innodb_data_reads; /*!< I/O read requests */
698
ulint innodb_buffer_pool_pages_total; /*!< Buffer pool size */
699
ulint innodb_buffer_pool_pages_data; /*!< Data pages */
700
ulint innodb_buffer_pool_pages_dirty; /*!< Dirty data pages */
701
ulint innodb_buffer_pool_pages_misc; /*!< Miscellanous pages */
702
ulint innodb_buffer_pool_pages_free; /*!< Free pages */
704
ulint innodb_buffer_pool_pages_latched; /*!< Latched pages */
705
#endif /* UNIV_DEBUG */
706
ulint innodb_buffer_pool_read_requests; /*!< buf_pool->stat.n_page_gets */
707
ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */
708
ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */
709
ulint innodb_buffer_pool_pages_flushed; /*!< srv_buf_pool_flushed */
710
ulint innodb_buffer_pool_write_requests;/*!< srv_buf_pool_write_requests */
711
ulint innodb_buffer_pool_read_ahead; /*!< srv_read_ahead */
712
ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/
713
ulint innodb_dblwr_pages_written; /*!< srv_dblwr_pages_written */
714
ulint innodb_dblwr_writes; /*!< srv_dblwr_writes */
715
ibool innodb_have_atomic_builtins; /*!< HAVE_ATOMIC_BUILTINS */
716
ulint innodb_log_waits; /*!< srv_log_waits */
717
ulint innodb_log_write_requests; /*!< srv_log_write_requests */
718
ulint innodb_log_writes; /*!< srv_log_writes */
719
ulint innodb_os_log_written; /*!< srv_os_log_written */
720
ulint innodb_os_log_fsyncs; /*!< fil_n_log_flushes */
721
ulint innodb_os_log_pending_writes; /*!< srv_os_log_pending_writes */
722
ulint innodb_os_log_pending_fsyncs; /*!< fil_n_pending_log_flushes */
723
ulint innodb_page_size; /*!< UNIV_PAGE_SIZE */
724
ulint innodb_pages_created; /*!< buf_pool->stat.n_pages_created */
725
ulint innodb_pages_read; /*!< buf_pool->stat.n_pages_read */
726
ulint innodb_pages_written; /*!< buf_pool->stat.n_pages_written */
727
ulint innodb_row_lock_waits; /*!< srv_n_lock_wait_count */
728
ulint innodb_row_lock_current_waits; /*!< srv_n_lock_wait_current_count */
729
ib_int64_t innodb_row_lock_time; /*!< srv_n_lock_wait_time
731
ulint innodb_row_lock_time_avg; /*!< srv_n_lock_wait_time
733
/ srv_n_lock_wait_count */
734
ulint innodb_row_lock_time_max; /*!< srv_n_lock_max_wait_time
736
ulint innodb_rows_read; /*!< srv_n_rows_read */
737
ulint innodb_rows_inserted; /*!< srv_n_rows_inserted */
738
ulint innodb_rows_updated; /*!< srv_n_rows_updated */
739
ulint innodb_rows_deleted; /*!< srv_n_rows_deleted */
740
ulint innodb_truncated_status_writes; /*!< srv_truncated_status_writes */
743
/** Thread slot in the thread table */
495
/* Thread slot in the thread table */
744
496
typedef struct srv_slot_struct srv_slot_t;
746
/** Thread table is an array of slots */
498
/* Thread table is an array of slots */
747
499
typedef srv_slot_t srv_table_t;
749
/** The server system struct */
501
/* In this structure we store status variables to be passed to MySQL */
502
struct export_var_struct{
503
ulint innodb_data_pending_reads;
504
ulint innodb_data_pending_writes;
505
ulint innodb_data_pending_fsyncs;
506
ulint innodb_data_fsyncs;
507
ulint innodb_data_read;
508
ulint innodb_data_writes;
509
ulint innodb_data_written;
510
ulint innodb_data_reads;
511
ulint innodb_buffer_pool_pages_total;
512
ulint innodb_buffer_pool_pages_data;
513
ulint innodb_buffer_pool_pages_dirty;
514
ulint innodb_buffer_pool_pages_misc;
515
ulint innodb_buffer_pool_pages_free;
517
ulint innodb_buffer_pool_pages_latched;
518
#endif /* UNIV_DEBUG */
519
ulint innodb_buffer_pool_read_requests;
520
ulint innodb_buffer_pool_reads;
521
ulint innodb_buffer_pool_wait_free;
522
ulint innodb_buffer_pool_pages_flushed;
523
ulint innodb_buffer_pool_write_requests;
524
ulint innodb_buffer_pool_read_ahead_seq;
525
ulint innodb_buffer_pool_read_ahead_rnd;
526
ulint innodb_dblwr_pages_written;
527
ulint innodb_dblwr_writes;
528
ulint innodb_log_waits;
529
ulint innodb_log_write_requests;
530
ulint innodb_log_writes;
531
ulint innodb_os_log_written;
532
ulint innodb_os_log_fsyncs;
533
ulint innodb_os_log_pending_writes;
534
ulint innodb_os_log_pending_fsyncs;
535
ulint innodb_page_size;
536
ulint innodb_pages_created;
537
ulint innodb_pages_read;
538
ulint innodb_pages_written;
539
ulint innodb_row_lock_waits;
540
ulint innodb_row_lock_current_waits;
541
ib_int64_t innodb_row_lock_time;
542
ulint innodb_row_lock_time_avg;
543
ulint innodb_row_lock_time_max;
544
ulint innodb_rows_read;
545
ulint innodb_rows_inserted;
546
ulint innodb_rows_updated;
547
ulint innodb_rows_deleted;
550
/* The server system struct */
750
551
struct srv_sys_struct{
751
srv_table_t* threads; /*!< server thread table */
552
srv_table_t* threads; /* server thread table */
752
553
UT_LIST_BASE_NODE_T(que_thr_t)
753
tasks; /*!< task queue */
554
tasks; /* task queue */
555
dict_index_t* dummy_ind1; /* dummy index for old-style
556
supremum and infimum records */
557
dict_index_t* dummy_ind2; /* dummy index for new-style
558
supremum and infimum records */
756
561
extern ulint srv_n_threads_active[];
757
#else /* !UNIV_HOTBACKUP */
758
# define srv_use_adaptive_hash_indexes FALSE
759
# define srv_use_checksums TRUE
760
# define srv_use_native_aio FALSE
761
# define srv_force_recovery 0UL
762
# define srv_set_io_thread_op_info(t,info) ((void) 0)
763
# define srv_is_being_started 0
764
# define srv_win_file_flush_method SRV_WIN_IO_UNBUFFERED
765
# define srv_unix_file_flush_method SRV_UNIX_O_DSYNC
766
# define srv_start_raw_disk_in_use 0
767
# define srv_file_per_table 1
768
#endif /* !UNIV_HOTBACKUP */