~drizzle-trunk/drizzle/development

641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
1
/*****************************************************************************
2
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
3
Copyright (C) 1995, 2010, Innobase Oy. All Rights Reserved.
4
Copyright (C) 2008, 2009, Google Inc.
5
Copyright (C) 2009, Percona Inc.
641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
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
1819.5.180 by calvin
Merge Revision revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6533 from MySQL InnoDB
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
641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
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.
23
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.
27
28
You should have received a copy of the GNU General Public License along with
1802.10.2 by Monty Taylor
Update all of the copyright headers to include the correct address.
29
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
30
St, Fifth Floor, Boston, MA 02110-1301 USA
641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
31
32
*****************************************************************************/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
33
34
/**************************************************//**
35
@file include/srv0srv.h
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
36
The server main program
37
38
Created 10/10/1995 Heikki Tuuri
39
*******************************************************/
40
41
#ifndef srv0srv_h
42
#define srv0srv_h
43
44
#include "univ.i"
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
45
#ifndef UNIV_HOTBACKUP
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
46
#include "sync0sync.h"
47
#include "os0sync.h"
48
#include "que0types.h"
49
#include "trx0types.h"
50
51
extern const char*	srv_main_thread_op_info;
52
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
53
/** Prefix used by MySQL to indicate pre-5.1 table name encoding */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
54
extern const char	srv_mysql50_table_name_prefix[9];
55
56
/* When this event is set the lock timeout and InnoDB monitor
57
thread starts running */
58
extern os_event_t	srv_lock_timeout_thread_event;
59
1819.9.162 by Sunny Bains
Merge Revision revid:sunny.bains@oracle.com-20101014031202-36pv7sr5deftdrl4 from MySQL InnoDB
60
/* The monitor thread waits on this event. */
61
extern os_event_t	srv_monitor_event;
62
63
/* The lock timeout thread waits on this event. */
64
extern os_event_t	srv_timeout_event;
65
66
/* The error monitor thread waits on this event. */
67
extern os_event_t	srv_error_event;
68
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
69
/* If the last data file is auto-extended, we add this many pages to it
70
at a time */
71
#define SRV_AUTO_EXTEND_INCREMENT	\
72
	(srv_auto_extend_increment * ((1024 * 1024) / UNIV_PAGE_SIZE))
73
74
/* This is set to TRUE if the MySQL user has set it in MySQL */
75
extern ibool	srv_lower_case_table_names;
76
77
/* Mutex for locking srv_monitor_file */
78
extern mutex_t	srv_monitor_file_mutex;
79
/* Temporary file for innodb monitor output */
80
extern FILE*	srv_monitor_file;
81
/* Mutex for locking srv_dict_tmpfile.
82
This mutex has a very high rank; threads reserving it should not
83
be holding any InnoDB latches. */
84
extern mutex_t	srv_dict_tmpfile_mutex;
85
/* Temporary file for output from the data dictionary */
86
extern FILE*	srv_dict_tmpfile;
87
/* Mutex for locking srv_misc_tmpfile.
88
This mutex has a very low rank; threads reserving it should not
89
acquire any further latches or sleep before releasing this one. */
90
extern mutex_t	srv_misc_tmpfile_mutex;
91
/* Temporary file for miscellanous diagnostic output */
92
extern FILE*	srv_misc_tmpfile;
93
94
/* Server parameters which are read from the initfile */
95
96
extern char*	srv_data_home;
97
#ifdef UNIV_LOG_ARCHIVE
98
extern char*	srv_arch_dir;
99
#endif /* UNIV_LOG_ARCHIVE */
100
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
101
/** store to its own file each table created by an user; data
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
102
dictionary tables are in the system tablespace 0 */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
103
#ifndef UNIV_HOTBACKUP
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
104
extern my_bool	srv_file_per_table;
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
105
#else
106
extern ibool	srv_file_per_table;
107
#endif /* UNIV_HOTBACKUP */
108
/** The file format to use on new *.ibd files. */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
109
extern ulint	srv_file_format;
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
110
/** Whether to check file format during startup.  A value of
111
DICT_TF_FORMAT_MAX + 1 means no checking ie. FALSE.  The default is to
112
set it to the highest format we support. */
1819.7.175 by Jimmy Yang, Stewart Smith
Merge Revision revid:jimmy.yang@oracle.com-20100617091353-5zga8o5hxpi0l15q from MySQL InnoDB
113
extern ulint	srv_max_file_format_at_startup;
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
114
/** Place locks to records only i.e. do not use next-key locking except
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
115
on duplicate key checking and foreign key checking */
116
extern ibool	srv_locks_unsafe_for_binlog;
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
117
#endif /* !UNIV_HOTBACKUP */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
118
1819.7.68 by Stewart Smith
Merge initial InnoDB+ import.
119
/* If this flag is TRUE, then we will use the native aio of the
120
OS (provided we compiled Innobase with it in), otherwise we will
121
use simulated aio we build below with threads.
122
Currently we support native aio on windows and linux */
123
extern my_bool	srv_use_native_aio;
1819.9.44 by Calvin Sun, Stewart Smith
Merge Revision revid:calvin.sun@oracle.com-20100720204231-h3nw0d9q3h79krr4 from MySQL InnoDB
124
#ifdef __WIN__
125
extern ibool	srv_use_native_conditions;
126
#endif
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
127
extern ulint	srv_n_data_files;
128
extern char**	srv_data_file_names;
129
extern ulint*	srv_data_file_sizes;
130
extern ulint*	srv_data_file_is_raw_partition;
131
132
extern ibool	srv_auto_extend_last_data_file;
133
extern ulint	srv_last_file_size_max;
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
134
extern char**	srv_log_group_home_dirs;
135
#ifndef UNIV_HOTBACKUP
937.3.4 by Stewart Smith
fix innodb_autoextend_increment for sparc
136
extern unsigned int srv_auto_extend_increment;
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
137
138
extern ibool	srv_created_new_raw;
139
140
extern ulint	srv_n_log_groups;
141
extern ulint	srv_n_log_files;
142
extern ulint	srv_log_file_size;
143
extern ulint	srv_log_buffer_size;
144
extern ulong	srv_flush_log_at_trx_commit;
1114.1.1 by Monty Taylor
Merged InnoDB Plugin 1.0.4
145
extern bool	srv_adaptive_flushing;
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
146
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
147
148
/* The sort order table of the MySQL latin1_swedish_ci character set
149
collation */
1114.1.1 by Monty Taylor
Merged InnoDB Plugin 1.0.4
150
#if defined(BUILD_DRIZZLE)
641.1.4 by Monty Taylor
Merged in InnoDB changes.
151
extern const byte  srv_latin1_ordering[256];
933.1.1 by Monty Taylor
Merged in InnoDB Plugin 1.0.3
152
extern bool	srv_use_sys_malloc;
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
153
#else
1114.1.1 by Monty Taylor
Merged InnoDB Plugin 1.0.4
154
extern const byte*     srv_latin1_ordering;
155
# ifndef UNIV_HOTBACKUP
156
extern my_bool srv_use_sys_malloc;
157
# else
158
extern ibool   srv_use_sys_malloc;
159
# endif /* UNIV_HOTBACKUP */
160
#endif /* BUILD_DRIZZLE */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
161
extern ulint	srv_buf_pool_size;	/*!< requested size in bytes */
1819.7.68 by Stewart Smith
Merge initial InnoDB+ import.
162
extern ulint    srv_buf_pool_instances; /*!< requested number of buffer pool instances */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
163
extern ulint	srv_buf_pool_old_size;	/*!< previously requested size */
164
extern ulint	srv_buf_pool_curr_size;	/*!< current size in bytes */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
165
extern ulint	srv_mem_pool_size;
166
extern ulint	srv_lock_table_size;
167
168
extern ulint	srv_n_file_io_threads;
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
169
extern ulong	srv_read_ahead_threshold;
170
extern ulint	srv_n_read_io_threads;
171
extern ulint	srv_n_write_io_threads;
172
173
/* Number of IO operations per second the server can do */
174
extern ulong    srv_io_capacity;
175
/* Returns the number of IO operations that is X percent of the
176
capacity. PCT_IO(5) -> returns the number of IO operations that
177
is 5% of the max where max is srv_io_capacity.  */
178
#define PCT_IO(p) ((ulong) (srv_io_capacity * ((double) p / 100.0)))
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
179
180
#ifdef UNIV_LOG_ARCHIVE
1819.9.31 by Marko Mäkelä, Stewart Smith
Merge Revision revid:marko.makela@oracle.com-20100623110659-pk5bqnmo0j7hj6md from MySQL InnoDB
181
extern ibool		srv_log_archive_on;
182
extern ibool		srv_archive_recovery;
183
extern ib_uint64_t	srv_archive_recovery_limit_lsn;
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
184
#endif /* UNIV_LOG_ARCHIVE */
185
186
extern char*	srv_file_flush_method_str;
187
extern ulint	srv_unix_file_flush_method;
188
extern ulint	srv_win_file_flush_method;
189
190
extern ulint	srv_max_n_open_files;
191
192
extern ulint	srv_max_dirty_pages_pct;
193
194
extern ulint	srv_force_recovery;
195
extern ulong	srv_thread_concurrency;
196
197
extern ulint	srv_max_n_threads;
198
199
extern lint	srv_conc_n_threads;
200
201
extern ulint	srv_fast_shutdown;	 /* If this is 1, do not do a
202
					 purge and index buffer merge.
203
					 If this 2, do not even flush the
204
					 buffer pool to data files at the
205
					 shutdown: we effectively 'crash'
206
					 InnoDB (but lose no committed
207
					 transactions). */
208
extern ibool	srv_innodb_status;
209
641.3.9 by Monty Taylor
More removal of my_malloc.
210
extern ib_uint64_t	srv_stats_sample_pages;
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
211
212
extern ibool	srv_use_doublewrite_buf;
213
extern ibool	srv_use_checksums;
214
215
extern ulong	srv_max_buf_pool_modified_pct;
216
extern ulong	srv_max_purge_lag;
217
641.2.1 by Monty Taylor
InnoDB Plugin 1.0.2
218
extern ulong	srv_replication_delay;
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
219
/*-------------------------------------------*/
220
221
extern ulint	srv_n_rows_inserted;
222
extern ulint	srv_n_rows_updated;
223
extern ulint	srv_n_rows_deleted;
224
extern ulint	srv_n_rows_read;
225
226
extern ibool	srv_print_innodb_monitor;
227
extern ibool	srv_print_innodb_lock_monitor;
228
extern ibool	srv_print_innodb_tablespace_monitor;
229
extern ibool	srv_print_verbose_log;
230
extern ibool	srv_print_innodb_table_monitor;
231
1819.5.161 by marko
Merge Revision revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6352 from MySQL InnoDB
232
extern ibool	srv_lock_timeout_active;
233
extern ibool	srv_monitor_active;
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
234
extern ibool	srv_error_monitor_active;
235
236
extern ulong	srv_n_spin_wait_rounds;
237
extern ulong	srv_n_free_tickets_to_enter;
238
extern ulong	srv_thread_sleep_delay;
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
239
extern ulong	srv_spin_wait_delay;
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
240
extern ibool	srv_priority_boost;
241
1819.9.143 by Mark Leith, Stewart Smith
Merge Revision revid:mark.leith@oracle.com-20100923081209-ftyn1ft7dw642kc0 from MySQL InnoDB
242
extern ulint	srv_truncated_status_writes;
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
243
244
#ifdef UNIV_DEBUG
245
extern	ibool	srv_print_thread_releases;
246
extern	ibool	srv_print_lock_waits;
247
extern	ibool	srv_print_buf_io;
248
extern	ibool	srv_print_log_io;
249
extern	ibool	srv_print_latch_waits;
250
#else /* UNIV_DEBUG */
251
# define srv_print_thread_releases	FALSE
252
# define srv_print_lock_waits		FALSE
253
# define srv_print_buf_io		FALSE
254
# define srv_print_log_io		FALSE
255
# define srv_print_latch_waits		FALSE
256
#endif /* UNIV_DEBUG */
257
1819.7.108 by Sunny Bains, Stewart Smith
Merge Revision revid:sunny.bains@oracle.com-20100512011810-oevtsyyudf6wusbi from MySQL InnoDB
258
extern ulint	srv_activity_count;
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
259
extern ulint	srv_fatal_semaphore_wait_threshold;
260
extern ulint	srv_dml_needed_delay;
261
262
extern mutex_t*	kernel_mutex_temp;/* mutex protecting the server, trx structs,
263
				query threads, and lock table: we allocate
264
				it from dynamic memory to get it to the
265
				same DRAM page as other hotspot semaphores */
266
#define kernel_mutex (*kernel_mutex_temp)
267
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
268
#define SRV_MAX_N_IO_THREADS	130
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
269
270
/* Array of English strings describing the current state of an
271
i/o handler thread */
272
extern const char* srv_io_thread_op_info[];
273
extern const char* srv_io_thread_function[];
274
275
/* the number of the log write requests done */
276
extern ulint srv_log_write_requests;
277
278
/* the number of physical writes to the log performed */
279
extern ulint srv_log_writes;
280
281
/* amount of data written to the log files in bytes */
282
extern ulint srv_os_log_written;
283
284
/* amount of writes being done to the log files */
285
extern ulint srv_os_log_pending_writes;
286
287
/* we increase this counter, when there we don't have enough space in the
288
log buffer and have to flush it */
289
extern ulint srv_log_waits;
290
1819.7.68 by Stewart Smith
Merge initial InnoDB+ import.
291
/* the number of purge threads to use from the worker pool (currently 0 or 1) */
1819.7.97 by Calvin Sun
Merge Revision revid:calvin.sun@oracle.com-20100507214030-cap6783iuooqrxkx from MySQL InnoDB
292
extern ulong srv_n_purge_threads;
1819.7.68 by Stewart Smith
Merge initial InnoDB+ import.
293
294
/* the number of records to purge in one batch */
1819.7.97 by Calvin Sun
Merge Revision revid:calvin.sun@oracle.com-20100507214030-cap6783iuooqrxkx from MySQL InnoDB
295
extern ulong srv_purge_batch_size;
1819.7.68 by Stewart Smith
Merge initial InnoDB+ import.
296
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
297
/* variable that counts amount of data read in total (in bytes) */
298
extern ulint srv_data_read;
299
300
/* here we count the amount of data written in total (in bytes) */
301
extern ulint srv_data_written;
302
303
/* this variable counts the amount of times, when the doublewrite buffer
304
was flushed */
305
extern ulint srv_dblwr_writes;
306
307
/* here we store the number of pages that have been flushed to the
308
doublewrite buffer */
309
extern ulint srv_dblwr_pages_written;
310
311
/* in this variable we store the number of write requests issued */
312
extern ulint srv_buf_pool_write_requests;
313
314
/* here we store the number of times when we had to wait for a free page
315
in the buffer pool. It happens when the buffer pool is full and we need
316
to make a flush, in order to be able to read or create a page. */
317
extern ulint srv_buf_pool_wait_free;
318
319
/* variable to count the number of pages that were written from the
320
buffer pool to disk */
321
extern ulint srv_buf_pool_flushed;
322
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
323
/** Number of buffer pool reads that led to the
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
324
reading of a disk page */
325
extern ulint srv_buf_pool_reads;
326
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
327
/** Status variables to be passed to MySQL */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
328
typedef struct export_var_struct export_struc;
329
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
330
/** Status variables to be passed to MySQL */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
331
extern export_struc export_vars;
332
1819.7.108 by Sunny Bains, Stewart Smith
Merge Revision revid:sunny.bains@oracle.com-20100512011810-oevtsyyudf6wusbi from MySQL InnoDB
333
/** The server system */
334
typedef struct srv_sys_struct	srv_sys_t;
335
336
/** The server system */
337
extern srv_sys_t*	srv_sys;
338
1819.7.68 by Stewart Smith
Merge initial InnoDB+ import.
339
# ifdef UNIV_PFS_THREAD
340
/* Keys to register InnoDB threads with performance schema */
341
extern mysql_pfs_key_t	trx_rollback_clean_thread_key;
342
extern mysql_pfs_key_t	io_handler_thread_key;
343
extern mysql_pfs_key_t	srv_lock_timeout_thread_key;
344
extern mysql_pfs_key_t	srv_error_monitor_thread_key;
345
extern mysql_pfs_key_t	srv_monitor_thread_key;
346
extern mysql_pfs_key_t	srv_master_thread_key;
347
348
/* This macro register the current thread and its key with performance
349
schema */
350
#  define pfs_register_thread(key)			\
351
do {								\
352
	if (PSI_server) {					\
353
		struct PSI_thread* psi = PSI_server->new_thread(key, NULL, 0);\
354
		if (psi) {					\
355
			PSI_server->set_thread(psi);		\
356
		}						\
357
	}							\
358
} while (0)
359
360
/* This macro delist the current thread from performance schema */
361
#  define pfs_delete_thread()				\
362
do {								\
363
	if (PSI_server) {					\
364
		PSI_server->delete_current_thread();		\
365
	}							\
366
} while (0)
367
# endif /* UNIV_PFS_THREAD */
368
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
369
#endif /* !UNIV_HOTBACKUP */
370
371
/** Types of raw partitions in innodb_data_file_path */
372
enum {
373
	SRV_NOT_RAW = 0,	/*!< Not a raw partition */
374
	SRV_NEW_RAW,		/*!< A 'newraw' partition, only to be
375
				initialized */
376
	SRV_OLD_RAW		/*!< An initialized raw partition */
377
};
378
379
/** Alternatives for the file flush option in Unix; see the InnoDB manual
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
380
about what these mean */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
381
enum {
382
	SRV_UNIX_FSYNC = 1,	/*!< fsync, the default */
383
	SRV_UNIX_O_DSYNC,	/*!< open log files in O_SYNC mode */
384
	SRV_UNIX_LITTLESYNC,	/*!< do not call os_file_flush()
385
				when writing data files, but do flush
386
				after writing to log files */
387
	SRV_UNIX_NOSYNC,	/*!< do not flush after writing */
388
	SRV_UNIX_O_DIRECT	/*!< invoke os_file_set_nocache() on
389
				data files */
390
};
391
392
/** Alternatives for file i/o in Windows */
393
enum {
394
	SRV_WIN_IO_NORMAL = 1,	/*!< buffered I/O */
395
	SRV_WIN_IO_UNBUFFERED	/*!< unbuffered I/O; this is the default */
396
};
397
398
/** Alternatives for srv_force_recovery. Non-zero values are intended
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
399
to help the user get a damaged database up so that he can dump intact
400
tables and rows with SELECT INTO OUTFILE. The database must not otherwise
401
be used with these options! A bigger number below means that all precautions
402
of lower numbers are included. */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
403
enum {
404
	SRV_FORCE_IGNORE_CORRUPT = 1,	/*!< let the server run even if it
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
405
					detects a corrupt page */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
406
	SRV_FORCE_NO_BACKGROUND	= 2,	/*!< prevent the main thread from
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
407
					running: if a crash would occur
408
					in purge, this prevents it */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
409
	SRV_FORCE_NO_TRX_UNDO = 3,	/*!< do not run trx rollback after
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
410
					recovery */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
411
	SRV_FORCE_NO_IBUF_MERGE = 4,	/*!< prevent also ibuf operations:
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
412
					if they would cause a crash, better
413
					not do them */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
414
	SRV_FORCE_NO_UNDO_LOG_SCAN = 5,	/*!< do not look at undo logs when
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
415
					starting the database: InnoDB will
416
					treat even incomplete transactions
417
					as committed */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
418
	SRV_FORCE_NO_LOG_REDO = 6	/*!< do not do the log roll-forward
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
419
					in connection with recovery */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
420
};
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
421
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
422
#ifndef UNIV_HOTBACKUP
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
423
/** Types of threads existing in the system. */
424
enum srv_thread_type {
425
	SRV_COM = 1,	/**< threads serving communication and queries */
426
	SRV_CONSOLE,	/**< thread serving console */
427
	SRV_WORKER,	/**< threads serving parallelized queries and
428
			queries released from lock wait */
429
#if 0
430
	/* Utility threads */
431
	SRV_BUFFER,	/**< thread flushing dirty buffer blocks */
432
	SRV_RECOVERY,	/**< threads finishing a recovery */
433
	SRV_INSERT,	/**< thread flushing the insert buffer to disk */
434
#endif
435
	SRV_MASTER	/**< the master thread, (whose type number must
436
			be biggest) */
437
};
438
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
439
/*********************************************************************//**
440
Boots Innobase server.
441
@return	DB_SUCCESS or error code */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
442
UNIV_INTERN
443
ulint
444
srv_boot(void);
445
/*==========*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
446
/*********************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
447
Initializes the server. */
448
UNIV_INTERN
449
void
450
srv_init(void);
451
/*==========*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
452
/*********************************************************************//**
1819.5.106 by stewart at flamingspork
[patch 106/129] Merge patch for revision 1915 from InnoDB SVN:
453
Frees the data structures created in srv_init(). */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
454
UNIV_INTERN
455
void
456
srv_free(void);
457
/*==========*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
458
/*********************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
459
Initializes the synchronization primitives, memory system, and the thread
460
local storage. */
461
UNIV_INTERN
462
void
463
srv_general_init(void);
464
/*==================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
465
/*********************************************************************//**
466
Gets the number of threads in the system.
467
@return	sum of srv_n_threads[] */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
468
UNIV_INTERN
469
ulint
470
srv_get_n_threads(void);
471
/*===================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
472
/*********************************************************************//**
473
Returns the calling thread type.
474
@return	SRV_COM, ... */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
475
476
enum srv_thread_type
477
srv_get_thread_type(void);
478
/*=====================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
479
/*********************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
480
Sets the info describing an i/o thread current state. */
481
UNIV_INTERN
482
void
483
srv_set_io_thread_op_info(
484
/*======================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
485
	ulint		i,	/*!< in: the 'segment' of the i/o thread */
486
	const char*	str);	/*!< in: constant char string describing the
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
487
				state */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
488
/*********************************************************************//**
1819.7.108 by Sunny Bains, Stewart Smith
Merge Revision revid:sunny.bains@oracle.com-20100512011810-oevtsyyudf6wusbi from MySQL InnoDB
489
Releases threads of the type given from suspension in the thread table.
490
NOTE! The server mutex has to be reserved by the caller!
491
@return number of threads released: this may be less than n if not
492
enough threads were suspended at the moment */
493
UNIV_INTERN
494
ulint
495
srv_release_threads(
496
/*================*/
497
	enum srv_thread_type	type,	/*!< in: thread type */
498
	ulint			n);	/*!< in: number of threads to release */
499
/*********************************************************************//**
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
500
The master thread controlling the server.
501
@return	a dummy parameter */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
502
UNIV_INTERN
503
os_thread_ret_t
504
srv_master_thread(
505
/*==============*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
506
	void*	arg);	/*!< in: a dummy parameter required by
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
507
			os_thread_create */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
508
/*******************************************************************//**
1819.7.68 by Stewart Smith
Merge initial InnoDB+ import.
509
Wakes up the purge thread if it's not already awake. */
510
UNIV_INTERN
511
void
512
srv_wake_purge_thread(void);
513
/*=======================*/
514
/*******************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
515
Tells the Innobase server that there has been activity in the database
516
and wakes up the master thread if it is suspended (not sleeping). Used
517
in the MySQL interface. Note that there is a small chance that the master
518
thread stays suspended (we do not protect our operation with the kernel
519
mutex, for performace reasons). */
520
UNIV_INTERN
521
void
522
srv_active_wake_master_thread(void);
523
/*===============================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
524
/*******************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
525
Wakes up the master thread if it is suspended or being suspended. */
526
UNIV_INTERN
527
void
528
srv_wake_master_thread(void);
529
/*========================*/
1819.7.68 by Stewart Smith
Merge initial InnoDB+ import.
530
/*******************************************************************//**
531
Tells the purge thread that there has been activity in the database
532
and wakes up the purge thread if it is suspended (not sleeping).  Note
533
that there is a small chance that the purge thread stays suspended
534
(we do not protect our operation with the kernel mutex, for
535
performace reasons). */
536
UNIV_INTERN
537
void
538
srv_wake_purge_thread_if_not_active(void);
539
/*=====================================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
540
/*********************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
541
Puts an OS thread to wait if there are too many concurrent threads
542
(>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. */
543
UNIV_INTERN
544
void
545
srv_conc_enter_innodb(
546
/*==================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
547
	trx_t*	trx);	/*!< in: transaction object associated with the
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
548
			thread */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
549
/*********************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
550
This lets a thread enter InnoDB regardless of the number of threads inside
551
InnoDB. This must be called when a thread ends a lock wait. */
552
UNIV_INTERN
553
void
554
srv_conc_force_enter_innodb(
555
/*========================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
556
	trx_t*	trx);	/*!< in: transaction object associated with the
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
557
			thread */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
558
/*********************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
559
This must be called when a thread exits InnoDB in a lock wait or at the
560
end of an SQL statement. */
561
UNIV_INTERN
562
void
563
srv_conc_force_exit_innodb(
564
/*=======================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
565
	trx_t*	trx);	/*!< in: transaction object associated with the
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
566
			thread */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
567
/*********************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
568
This must be called when a thread exits InnoDB. */
569
UNIV_INTERN
570
void
571
srv_conc_exit_innodb(
572
/*=================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
573
	trx_t*	trx);	/*!< in: transaction object associated with the
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
574
			thread */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
575
/***************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
576
Puts a MySQL OS thread to wait for a lock to be released. If an error
577
occurs during the wait trx->error_state associated with thr is
578
!= DB_SUCCESS when we return. DB_LOCK_WAIT_TIMEOUT and DB_DEADLOCK
579
are possible errors. DB_DEADLOCK is returned if selective deadlock
580
resolution chose this transaction as a victim. */
581
UNIV_INTERN
582
void
583
srv_suspend_mysql_thread(
584
/*=====================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
585
	que_thr_t*	thr);	/*!< in: query thread associated with the MySQL
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
586
				OS thread */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
587
/********************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
588
Releases a MySQL OS thread waiting for a lock to be released, if the
589
thread is already suspended. */
590
UNIV_INTERN
591
void
592
srv_release_mysql_thread_if_suspended(
593
/*==================================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
594
	que_thr_t*	thr);	/*!< in: query thread associated with the
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
595
				MySQL OS thread	 */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
596
/*********************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
597
A thread which wakes up threads whose lock wait may have lasted too long.
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
598
@return	a dummy parameter */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
599
UNIV_INTERN
600
os_thread_ret_t
1819.5.161 by marko
Merge Revision revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6352 from MySQL InnoDB
601
srv_lock_timeout_thread(
602
/*====================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
603
	void*	arg);	/*!< in: a dummy parameter required by
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
604
			os_thread_create */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
605
/*********************************************************************//**
1819.5.161 by marko
Merge Revision revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6352 from MySQL InnoDB
606
A thread which prints the info output by various InnoDB monitors.
607
@return	a dummy parameter */
608
UNIV_INTERN
609
os_thread_ret_t
610
srv_monitor_thread(
611
/*===============*/
612
	void*	arg);	/*!< in: a dummy parameter required by
613
			os_thread_create */
614
/*************************************************************************
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
615
A thread which prints warnings about semaphore waits which have lasted
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
616
too long. These can be used to track bugs which cause hangs.
617
@return	a dummy parameter */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
618
UNIV_INTERN
619
os_thread_ret_t
620
srv_error_monitor_thread(
621
/*=====================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
622
	void*	arg);	/*!< in: a dummy parameter required by
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
623
			os_thread_create */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
624
/******************************************************************//**
1819.5.161 by marko
Merge Revision revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6352 from MySQL InnoDB
625
Outputs to a file the output of the InnoDB Monitor.
626
@return FALSE if not all information printed
627
due to failure to obtain necessary mutex */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
628
UNIV_INTERN
1819.5.161 by marko
Merge Revision revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6352 from MySQL InnoDB
629
ibool
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
630
srv_printf_innodb_monitor(
631
/*======================*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
632
	FILE*	file,		/*!< in: output stream */
1819.5.161 by marko
Merge Revision revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6352 from MySQL InnoDB
633
	ibool	nowait,		/*!< in: whether to wait for kernel mutex */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
634
	ulint*	trx_start,	/*!< out: file position of the start of
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
635
				the list of active transactions */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
636
	ulint*	trx_end);	/*!< out: file position of the end of
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
637
				the list of active transactions */
638
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
639
/******************************************************************//**
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
640
Function to pass InnoDB status variables to MySQL */
641
UNIV_INTERN
642
void
643
srv_export_innodb_status(void);
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
644
/*==========================*/
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
645
1819.7.112 by Stewart Smith
build fixes due to Drizzle having stricter compile flags to innobase
646
/******************************************************************//**
647
Increment the server activity counter. */
648
UNIV_INTERN
649
void
650
srv_inc_activity_count(void);
651
/*=========================*/
652
1819.7.68 by Stewart Smith
Merge initial InnoDB+ import.
653
/*********************************************************************//**
654
Asynchronous purge thread.
655
@return	a dummy parameter */
656
UNIV_INTERN
657
os_thread_ret_t
658
srv_purge_thread(
659
/*=============*/
660
	void*	arg __attribute__((unused))); /*!< in: a dummy parameter
661
					      required by os_thread_create */
662
663
/**********************************************************************//**
664
Enqueues a task to server task queue and releases a worker thread, if there
665
is a suspended one. */
666
UNIV_INTERN
667
void
668
srv_que_task_enqueue_low(
669
/*=====================*/
670
	que_thr_t*	thr);	/*!< in: query thread */
671
672
/**********************************************************************//**
1819.7.98 by Sunny Bains
Merge Revision revid:sunny.bains@oracle.com-20100510031717-vw5a99w2v7rot6f9 from MySQL InnoDB
673
Check whether any background thread is active.
674
@return FALSE if all are are suspended or have exited. */
1819.7.68 by Stewart Smith
Merge initial InnoDB+ import.
675
UNIV_INTERN
676
ibool
1819.7.98 by Sunny Bains
Merge Revision revid:sunny.bains@oracle.com-20100510031717-vw5a99w2v7rot6f9 from MySQL InnoDB
677
srv_is_any_background_thread_active(void);
678
/*======================================*/
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
679
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
680
/** Status variables to be passed to MySQL */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
681
struct export_var_struct{
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
682
	ulint innodb_data_pending_reads;	/*!< Pending reads */
683
	ulint innodb_data_pending_writes;	/*!< Pending writes */
684
	ulint innodb_data_pending_fsyncs;	/*!< Pending fsyncs */
685
	ulint innodb_data_fsyncs;		/*!< Number of fsyncs so far */
686
	ulint innodb_data_read;			/*!< Data bytes read */
687
	ulint innodb_data_writes;		/*!< I/O write requests */
688
	ulint innodb_data_written;		/*!< Data bytes written */
689
	ulint innodb_data_reads;		/*!< I/O read requests */
690
	ulint innodb_buffer_pool_pages_total;	/*!< Buffer pool size */
691
	ulint innodb_buffer_pool_pages_data;	/*!< Data pages */
692
	ulint innodb_buffer_pool_pages_dirty;	/*!< Dirty data pages */
693
	ulint innodb_buffer_pool_pages_misc;	/*!< Miscellanous pages */
694
	ulint innodb_buffer_pool_pages_free;	/*!< Free pages */
641.2.1 by Monty Taylor
InnoDB Plugin 1.0.2
695
#ifdef UNIV_DEBUG
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
696
	ulint innodb_buffer_pool_pages_latched;	/*!< Latched pages */
641.2.1 by Monty Taylor
InnoDB Plugin 1.0.2
697
#endif /* UNIV_DEBUG */
1819.5.19 by stewart at flamingspork
[patch 019/129] Merge patch for revision 1805 from InnoDB SVN:
698
	ulint innodb_buffer_pool_read_requests;	/*!< buf_pool->stat.n_page_gets */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
699
	ulint innodb_buffer_pool_reads;		/*!< srv_buf_pool_reads */
700
	ulint innodb_buffer_pool_wait_free;	/*!< srv_buf_pool_wait_free */
701
	ulint innodb_buffer_pool_pages_flushed;	/*!< srv_buf_pool_flushed */
702
	ulint innodb_buffer_pool_write_requests;/*!< srv_buf_pool_write_requests */
1819.5.19 by stewart at flamingspork
[patch 019/129] Merge patch for revision 1805 from InnoDB SVN:
703
	ulint innodb_buffer_pool_read_ahead;	/*!< srv_read_ahead */
704
	ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
705
	ulint innodb_dblwr_pages_written;	/*!< srv_dblwr_pages_written */
706
	ulint innodb_dblwr_writes;		/*!< srv_dblwr_writes */
707
	ibool innodb_have_atomic_builtins;	/*!< HAVE_ATOMIC_BUILTINS */
708
	ulint innodb_log_waits;			/*!< srv_log_waits */
709
	ulint innodb_log_write_requests;	/*!< srv_log_write_requests */
710
	ulint innodb_log_writes;		/*!< srv_log_writes */
711
	ulint innodb_os_log_written;		/*!< srv_os_log_written */
712
	ulint innodb_os_log_fsyncs;		/*!< fil_n_log_flushes */
713
	ulint innodb_os_log_pending_writes;	/*!< srv_os_log_pending_writes */
714
	ulint innodb_os_log_pending_fsyncs;	/*!< fil_n_pending_log_flushes */
715
	ulint innodb_page_size;			/*!< UNIV_PAGE_SIZE */
1819.5.19 by stewart at flamingspork
[patch 019/129] Merge patch for revision 1805 from InnoDB SVN:
716
	ulint innodb_pages_created;		/*!< buf_pool->stat.n_pages_created */
717
	ulint innodb_pages_read;		/*!< buf_pool->stat.n_pages_read */
718
	ulint innodb_pages_written;		/*!< buf_pool->stat.n_pages_written */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
719
	ulint innodb_row_lock_waits;		/*!< srv_n_lock_wait_count */
720
	ulint innodb_row_lock_current_waits;	/*!< srv_n_lock_wait_current_count */
721
	ib_int64_t innodb_row_lock_time;	/*!< srv_n_lock_wait_time
722
						/ 1000 */
723
	ulint innodb_row_lock_time_avg;		/*!< srv_n_lock_wait_time
724
						/ 1000
725
						/ srv_n_lock_wait_count */
726
	ulint innodb_row_lock_time_max;		/*!< srv_n_lock_max_wait_time
727
						/ 1000 */
728
	ulint innodb_rows_read;			/*!< srv_n_rows_read */
729
	ulint innodb_rows_inserted;		/*!< srv_n_rows_inserted */
730
	ulint innodb_rows_updated;		/*!< srv_n_rows_updated */
731
	ulint innodb_rows_deleted;		/*!< srv_n_rows_deleted */
1819.9.143 by Mark Leith, Stewart Smith
Merge Revision revid:mark.leith@oracle.com-20100923081209-ftyn1ft7dw642kc0 from MySQL InnoDB
732
	ulint innodb_truncated_status_writes;	/*!< srv_truncated_status_writes */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
733
};
734
1819.7.108 by Sunny Bains, Stewart Smith
Merge Revision revid:sunny.bains@oracle.com-20100512011810-oevtsyyudf6wusbi from MySQL InnoDB
735
/** Thread slot in the thread table */
736
typedef struct srv_slot_struct	srv_slot_t;
1819.9.143 by Mark Leith, Stewart Smith
Merge Revision revid:mark.leith@oracle.com-20100923081209-ftyn1ft7dw642kc0 from MySQL InnoDB
737
1819.7.108 by Sunny Bains, Stewart Smith
Merge Revision revid:sunny.bains@oracle.com-20100512011810-oevtsyyudf6wusbi from MySQL InnoDB
738
/** Thread table is an array of slots */
739
typedef srv_slot_t	srv_table_t;
740
741
/** The server system struct */
742
struct srv_sys_struct{
743
	srv_table_t*	threads;	/*!< server thread table */
744
	UT_LIST_BASE_NODE_T(que_thr_t)
745
			tasks;		/*!< task queue */
746
};
747
748
extern ulint	srv_n_threads_active[];
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
749
#else /* !UNIV_HOTBACKUP */
1819.7.68 by Stewart Smith
Merge initial InnoDB+ import.
750
# define srv_use_adaptive_hash_indexes		FALSE
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
751
# define srv_use_checksums			TRUE
1819.7.68 by Stewart Smith
Merge initial InnoDB+ import.
752
# define srv_use_native_aio			FALSE
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
753
# define srv_force_recovery			0UL
754
# define srv_set_io_thread_op_info(t,info)	((void) 0)
755
# define srv_is_being_started			0
756
# define srv_win_file_flush_method		SRV_WIN_IO_UNBUFFERED
757
# define srv_unix_file_flush_method		SRV_UNIX_O_DSYNC
758
# define srv_start_raw_disk_in_use		0
759
# define srv_file_per_table			1
760
#endif /* !UNIV_HOTBACKUP */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
761
1114.1.1 by Monty Taylor
Merged InnoDB Plugin 1.0.4
762
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
763
#endif