1
1
/*****************************************************************************
3
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
3
Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved.
4
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
7
8
Google, Inc. Those modifications are gratefully acknowledged and are described
9
10
incorporated with their permission, and subject to the conditions contained in
10
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
12
20
This program is free software; you can redistribute it and/or modify it under
13
21
the terms of the GNU General Public License as published by the Free Software
14
22
Foundation; version 2 of the License.
18
26
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20
28
You should have received a copy of the GNU General Public License along with
21
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
22
Place, Suite 330, Boston, MA 02111-1307 USA
29
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
30
St, Fifth Floor, Boston, MA 02110-1301 USA
24
32
*****************************************************************************/
25
/***********************************************************************
27
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
28
Copyright (c) 2009, Percona Inc.
30
Portions of this file contain modifications contributed and copyrighted
31
by Percona Inc.. Those modifications are
32
gratefully acknowledged and are described briefly in the InnoDB
33
documentation. The contributions by Percona Inc. are incorporated with
34
their permission, and subject to the conditions contained in the file
37
This program is free software; you can redistribute it and/or modify it
38
under the terms of the GNU General Public License as published by the
39
Free Software Foundation; version 2 of the License.
41
This program is distributed in the hope that it will be useful, but
42
WITHOUT ANY WARRANTY; without even the implied warranty of
43
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
44
Public License for more details.
46
You should have received a copy of the GNU General Public License along
47
with this program; if not, write to the Free Software Foundation, Inc.,
48
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
50
***********************************************************************/
52
34
/**************************************************//**
53
35
@file include/srv0srv.h
212
194
extern ibool srv_use_doublewrite_buf;
213
195
extern ibool srv_use_checksums;
215
extern ibool srv_set_thread_priorities;
216
extern int srv_query_thread_priority;
218
197
extern ulong srv_max_buf_pool_modified_pct;
219
198
extern ulong srv_max_purge_lag;
232
211
extern ibool srv_print_verbose_log;
233
212
extern ibool srv_print_innodb_table_monitor;
235
extern ibool srv_lock_timeout_and_monitor_active;
214
extern ibool srv_lock_timeout_active;
215
extern ibool srv_monitor_active;
236
216
extern ibool srv_error_monitor_active;
238
218
extern ulong srv_n_spin_wait_rounds;
318
298
/** Number of buffer pool reads that led to the
319
299
reading of a disk page */
320
300
extern ulint srv_buf_pool_reads;
321
/** Number of sequential read-aheads */
322
extern ulint srv_read_ahead_seq;
323
/** Number of random read-aheads */
324
extern ulint srv_read_ahead_rnd;
326
302
/** Status variables to be passed to MySQL */
327
303
typedef struct export_var_struct export_struc;
547
523
MySQL OS thread */
548
524
/*********************************************************************//**
549
525
A thread which wakes up threads whose lock wait may have lasted too long.
550
This also prints the info output by various InnoDB monitors.
551
526
@return a dummy parameter */
554
srv_lock_timeout_and_monitor_thread(
555
/*================================*/
529
srv_lock_timeout_thread(
530
/*====================*/
556
531
void* arg); /*!< in: a dummy parameter required by
557
532
os_thread_create */
558
533
/*********************************************************************//**
534
A thread which prints the info output by various InnoDB monitors.
535
@return a dummy parameter */
540
void* arg); /*!< in: a dummy parameter required by
542
/*************************************************************************
559
543
A thread which prints warnings about semaphore waits which have lasted
560
544
too long. These can be used to track bugs which cause hangs.
561
545
@return a dummy parameter */
566
550
void* arg); /*!< in: a dummy parameter required by
567
551
os_thread_create */
568
552
/******************************************************************//**
569
Outputs to a file the output of the InnoDB Monitor. */
553
Outputs to a file the output of the InnoDB Monitor.
554
@return FALSE if not all information printed
555
due to failure to obtain necessary mutex */
572
558
srv_printf_innodb_monitor(
573
559
/*======================*/
574
560
FILE* file, /*!< in: output stream */
561
ibool nowait, /*!< in: whether to wait for kernel mutex */
575
562
ulint* trx_start, /*!< out: file position of the start of
576
563
the list of active transactions */
577
564
ulint* trx_end); /*!< out: file position of the end of
608
595
#ifdef UNIV_DEBUG
609
596
ulint innodb_buffer_pool_pages_latched; /*!< Latched pages */
610
597
#endif /* UNIV_DEBUG */
611
ulint innodb_buffer_pool_read_requests; /*!< buf_pool->n_page_gets */
598
ulint innodb_buffer_pool_read_requests; /*!< buf_pool->stat.n_page_gets */
612
599
ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */
613
600
ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */
614
601
ulint innodb_buffer_pool_pages_flushed; /*!< srv_buf_pool_flushed */
615
602
ulint innodb_buffer_pool_write_requests;/*!< srv_buf_pool_write_requests */
616
ulint innodb_buffer_pool_read_ahead_seq;/*!< srv_read_ahead_seq */
617
ulint innodb_buffer_pool_read_ahead_rnd;/*!< srv_read_ahead_rnd */
603
ulint innodb_buffer_pool_read_ahead; /*!< srv_read_ahead */
604
ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/
618
605
ulint innodb_dblwr_pages_written; /*!< srv_dblwr_pages_written */
619
606
ulint innodb_dblwr_writes; /*!< srv_dblwr_writes */
620
607
ibool innodb_have_atomic_builtins; /*!< HAVE_ATOMIC_BUILTINS */
626
613
ulint innodb_os_log_pending_writes; /*!< srv_os_log_pending_writes */
627
614
ulint innodb_os_log_pending_fsyncs; /*!< fil_n_pending_log_flushes */
628
615
ulint innodb_page_size; /*!< UNIV_PAGE_SIZE */
629
ulint innodb_pages_created; /*!< buf_pool->n_pages_created */
630
ulint innodb_pages_read; /*!< buf_pool->n_pages_read */
631
ulint innodb_pages_written; /*!< buf_pool->n_pages_written */
616
ulint innodb_pages_created; /*!< buf_pool->stat.n_pages_created */
617
ulint innodb_pages_read; /*!< buf_pool->stat.n_pages_read */
618
ulint innodb_pages_written; /*!< buf_pool->stat.n_pages_written */
632
619
ulint innodb_row_lock_waits; /*!< srv_n_lock_wait_count */
633
620
ulint innodb_row_lock_current_waits; /*!< srv_n_lock_wait_current_count */
634
621
ib_int64_t innodb_row_lock_time; /*!< srv_n_lock_wait_time