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
*****************************************************************************/
26
1
/******************************************************
27
2
The database server main program
200
/* use os/external memory allocator */
201
UNIV_INTERN my_bool srv_use_sys_malloc = TRUE;
202
176
/* requested size in kilobytes */
203
UNIV_INTERN ulint srv_buf_pool_size = ULINT_MAX;
177
UNIV_INTERN ulong srv_buf_pool_size = ULINT_MAX;
204
178
/* previously requested size */
205
UNIV_INTERN ulint srv_buf_pool_old_size;
179
UNIV_INTERN ulong srv_buf_pool_old_size;
206
180
/* current size in kilobytes */
207
UNIV_INTERN ulint srv_buf_pool_curr_size = 0;
181
UNIV_INTERN ulong srv_buf_pool_curr_size = 0;
208
182
/* size in bytes */
209
183
UNIV_INTERN ulint srv_mem_pool_size = ULINT_MAX;
210
184
UNIV_INTERN ulint srv_lock_table_size = ULINT_MAX;
320
294
/* this mutex protects srv_conc data structures */
321
295
UNIV_INTERN os_fast_mutex_t srv_conc_mutex;
322
/* number of transactions that have declared_to_be_inside_innodb set.
323
It used to be a non-error for this value to drop below zero temporarily.
324
This is no longer true. We'll, however, keep the lint datatype to add
325
assertions to catch any corner cases that we may have missed. */
296
/* number of OS threads currently inside InnoDB; it is not an error if
297
this drops temporarily below zero because we do not demand that every
298
thread increments this, but a thread waiting for a lock decrements
326
300
UNIV_INTERN lint srv_conc_n_threads = 0;
327
301
/* number of OS threads waiting in the FIFO for a permission to enter
1522
1495
ut_a(trx->dict_operation_lock_mode == 0);
1524
/* Suspend this thread and wait for the event. */
1497
/* Wait for the release */
1526
1499
os_event_wait(event);
1528
/* After resuming, reacquire the data dictionary latch if
1531
1501
switch (had_dict_lock) {
1532
1502
case RW_S_LATCH:
1533
1503
row_mysql_freeze_data_dictionary(trx);
1884
1854
export_vars.innodb_buffer_pool_pages_misc = buf_pool->curr_size
1885
1855
- UT_LIST_GET_LEN(buf_pool->LRU)
1886
1856
- UT_LIST_GET_LEN(buf_pool->free);
1887
#ifdef HAVE_GCC_ATOMIC_BUILTINS
1888
export_vars.innodb_have_atomic_builtins = 1;
1890
export_vars.innodb_have_atomic_builtins = 0;
1892
1857
export_vars.innodb_page_size = UNIV_PAGE_SIZE;
1893
1858
export_vars.innodb_log_waits = srv_log_waits;
1894
1859
export_vars.innodb_os_log_written = srv_os_log_written;