1
/*****************************************************************************
3
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
4
Copyright (c) 2008, Google Inc.
6
Portions of this file contain modifications contributed and copyrighted by
7
Google, Inc. Those modifications are gratefully acknowledged and are described
8
briefly in the InnoDB documentation. The contributions by Google are
9
incorporated with their permission, and subject to the conditions contained in
10
the file COPYING.Google.
12
This program is free software; you can redistribute it and/or modify it under
13
the terms of the GNU General Public License as published by the Free Software
14
Foundation; version 2 of the License.
16
This program is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20
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
24
*****************************************************************************/
1
26
/******************************************************
2
27
The database server main program
137
161
UNIV_INTERN const byte* srv_latin1_ordering;
163
/* use os/external memory allocator */
164
UNIV_INTERN my_bool srv_use_sys_malloc = TRUE;
139
165
/* requested size in kilobytes */
140
UNIV_INTERN ulong srv_buf_pool_size = ULINT_MAX;
166
UNIV_INTERN ulint srv_buf_pool_size = ULINT_MAX;
141
167
/* previously requested size */
142
UNIV_INTERN ulong srv_buf_pool_old_size;
168
UNIV_INTERN ulint srv_buf_pool_old_size;
143
169
/* current size in kilobytes */
144
UNIV_INTERN ulong srv_buf_pool_curr_size = 0;
170
UNIV_INTERN ulint srv_buf_pool_curr_size = 0;
145
171
/* size in bytes */
146
172
UNIV_INTERN ulint srv_mem_pool_size = ULINT_MAX;
147
173
UNIV_INTERN ulint srv_lock_table_size = ULINT_MAX;
257
283
/* this mutex protects srv_conc data structures */
258
284
UNIV_INTERN os_fast_mutex_t srv_conc_mutex;
259
/* number of OS threads currently inside InnoDB; it is not an error if
260
this drops temporarily below zero because we do not demand that every
261
thread increments this, but a thread waiting for a lock decrements
285
/* number of transactions that have declared_to_be_inside_innodb set.
286
It used to be a non-error for this value to drop below zero temporarily.
287
This is no longer true. We'll, however, keep the lint datatype to add
288
assertions to catch any corner cases that we may have missed. */
263
289
UNIV_INTERN lint srv_conc_n_threads = 0;
264
290
/* number of OS threads waiting in the FIFO for a permission to enter
1458
1485
ut_a(trx->dict_operation_lock_mode == 0);
1460
/* Wait for the release */
1487
/* Suspend this thread and wait for the event. */
1462
1489
os_event_wait(event);
1491
/* After resuming, reacquire the data dictionary latch if
1464
1494
switch (had_dict_lock) {
1465
1495
case RW_S_LATCH:
1466
1496
row_mysql_freeze_data_dictionary(trx);
1817
1847
export_vars.innodb_buffer_pool_pages_misc = buf_pool->curr_size
1818
1848
- UT_LIST_GET_LEN(buf_pool->LRU)
1819
1849
- UT_LIST_GET_LEN(buf_pool->free);
1850
#ifdef HAVE_GCC_ATOMIC_BUILTINS
1851
export_vars.innodb_have_atomic_builtins = 1;
1853
export_vars.innodb_have_atomic_builtins = 0;
1820
1855
export_vars.innodb_page_size = UNIV_PAGE_SIZE;
1821
1856
export_vars.innodb_log_waits = srv_log_waits;
1822
1857
export_vars.innodb_os_log_written = srv_os_log_written;