~percona-dev/percona-innodb-plugin/percona-innodb-1.0

« back to all changes in this revision

Viewing changes to include/srv0srv.h

  • Committer: Vadim Tkachenko
  • Date: 2008-12-01 02:05:57 UTC
  • Revision ID: vadim@percona.com-20081201020557-p7k2m94mjtdg1a83
New rw-locks

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************
 
2
The server main program
 
3
 
 
4
(c) 1995 Innobase Oy
 
5
 
 
6
Created 10/10/1995 Heikki Tuuri
 
7
*******************************************************/
 
8
 
 
9
 
 
10
#ifndef srv0srv_h
 
11
#define srv0srv_h
 
12
 
 
13
#include "univ.i"
 
14
#include "sync0sync.h"
 
15
#include "os0sync.h"
 
16
#include "que0types.h"
 
17
#include "trx0types.h"
 
18
 
 
19
extern const char*      srv_main_thread_op_info;
 
20
 
 
21
/* Prefix used by MySQL to indicate pre-5.1 table name encoding */
 
22
extern const char       srv_mysql50_table_name_prefix[9];
 
23
 
 
24
/* When this event is set the lock timeout and InnoDB monitor
 
25
thread starts running */
 
26
extern os_event_t       srv_lock_timeout_thread_event;
 
27
 
 
28
/* If the last data file is auto-extended, we add this many pages to it
 
29
at a time */
 
30
#define SRV_AUTO_EXTEND_INCREMENT       \
 
31
        (srv_auto_extend_increment * ((1024 * 1024) / UNIV_PAGE_SIZE))
 
32
 
 
33
/* This is set to TRUE if the MySQL user has set it in MySQL */
 
34
extern ibool    srv_lower_case_table_names;
 
35
 
 
36
/* Mutex for locking srv_monitor_file */
 
37
extern mutex_t  srv_monitor_file_mutex;
 
38
/* Temporary file for innodb monitor output */
 
39
extern FILE*    srv_monitor_file;
 
40
/* Mutex for locking srv_dict_tmpfile.
 
41
This mutex has a very high rank; threads reserving it should not
 
42
be holding any InnoDB latches. */
 
43
extern mutex_t  srv_dict_tmpfile_mutex;
 
44
/* Temporary file for output from the data dictionary */
 
45
extern FILE*    srv_dict_tmpfile;
 
46
/* Mutex for locking srv_misc_tmpfile.
 
47
This mutex has a very low rank; threads reserving it should not
 
48
acquire any further latches or sleep before releasing this one. */
 
49
extern mutex_t  srv_misc_tmpfile_mutex;
 
50
/* Temporary file for miscellanous diagnostic output */
 
51
extern FILE*    srv_misc_tmpfile;
 
52
 
 
53
/* Server parameters which are read from the initfile */
 
54
 
 
55
extern char*    srv_data_home;
 
56
#ifdef UNIV_LOG_ARCHIVE
 
57
extern char*    srv_arch_dir;
 
58
#endif /* UNIV_LOG_ARCHIVE */
 
59
 
 
60
/* store to its own file each table created by an user; data
 
61
dictionary tables are in the system tablespace 0 */
 
62
extern my_bool  srv_file_per_table;
 
63
/* The file format to use on new *.ibd files. */
 
64
extern ulint    srv_file_format;
 
65
/* Whether to check file format during startup.*/
 
66
extern ulint    srv_check_file_format_at_startup;
 
67
/* Place locks to records only i.e. do not use next-key locking except
 
68
on duplicate key checking and foreign key checking */
 
69
extern ibool    srv_locks_unsafe_for_binlog;
 
70
 
 
71
extern ulint    srv_n_data_files;
 
72
extern char**   srv_data_file_names;
 
73
extern ulint*   srv_data_file_sizes;
 
74
extern ulint*   srv_data_file_is_raw_partition;
 
75
 
 
76
extern ibool    srv_auto_extend_last_data_file;
 
77
extern ulint    srv_last_file_size_max;
 
78
extern ulong    srv_auto_extend_increment;
 
79
 
 
80
extern ibool    srv_created_new_raw;
 
81
 
 
82
#define SRV_NEW_RAW     1
 
83
#define SRV_OLD_RAW     2
 
84
 
 
85
extern char**   srv_log_group_home_dirs;
 
86
 
 
87
extern ulint    srv_n_log_groups;
 
88
extern ulint    srv_n_log_files;
 
89
extern ulint    srv_log_file_size;
 
90
extern ulint    srv_log_buffer_size;
 
91
extern ulong    srv_flush_log_at_trx_commit;
 
92
 
 
93
/* The sort order table of the MySQL latin1_swedish_ci character set
 
94
collation */
 
95
extern const byte*      srv_latin1_ordering;
 
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 */
 
99
extern ulint    srv_mem_pool_size;
 
100
extern ulint    srv_lock_table_size;
 
101
 
 
102
extern ulint    srv_n_file_io_threads;
 
103
 
 
104
#ifdef UNIV_LOG_ARCHIVE
 
105
extern ibool    srv_log_archive_on;
 
106
extern ibool    srv_archive_recovery;
 
107
extern dulint   srv_archive_recovery_limit_lsn;
 
108
#endif /* UNIV_LOG_ARCHIVE */
 
109
 
 
110
extern ulint    srv_lock_wait_timeout;
 
111
 
 
112
extern char*    srv_file_flush_method_str;
 
113
extern ulint    srv_unix_file_flush_method;
 
114
extern ulint    srv_win_file_flush_method;
 
115
 
 
116
extern ulint    srv_max_n_open_files;
 
117
 
 
118
extern ulint    srv_max_dirty_pages_pct;
 
119
 
 
120
extern ulint    srv_force_recovery;
 
121
extern ulong    srv_thread_concurrency;
 
122
extern ulong    srv_commit_concurrency;
 
123
 
 
124
extern ulint    srv_max_n_threads;
 
125
 
 
126
extern lint     srv_conc_n_threads;
 
127
 
 
128
extern ulint    srv_fast_shutdown;       /* If this is 1, do not do a
 
129
                                         purge and index buffer merge.
 
130
                                         If this 2, do not even flush the
 
131
                                         buffer pool to data files at the
 
132
                                         shutdown: we effectively 'crash'
 
133
                                         InnoDB (but lose no committed
 
134
                                         transactions). */
 
135
extern ibool    srv_innodb_status;
 
136
 
 
137
extern ibool    srv_stats_on_metadata;
 
138
 
 
139
extern ibool    srv_use_doublewrite_buf;
 
140
extern ibool    srv_use_checksums;
 
141
 
 
142
extern ibool    srv_set_thread_priorities;
 
143
extern int      srv_query_thread_priority;
 
144
 
 
145
extern ulong    srv_max_buf_pool_modified_pct;
 
146
extern ulong    srv_max_purge_lag;
 
147
 
 
148
extern ulint    srv_replication_delay;
 
149
/*-------------------------------------------*/
 
150
 
 
151
extern ulint    srv_n_rows_inserted;
 
152
extern ulint    srv_n_rows_updated;
 
153
extern ulint    srv_n_rows_deleted;
 
154
extern ulint    srv_n_rows_read;
 
155
 
 
156
extern ibool    srv_print_innodb_monitor;
 
157
extern ibool    srv_print_innodb_lock_monitor;
 
158
extern ibool    srv_print_innodb_tablespace_monitor;
 
159
extern ibool    srv_print_verbose_log;
 
160
extern ibool    srv_print_innodb_table_monitor;
 
161
 
 
162
extern ibool    srv_lock_timeout_and_monitor_active;
 
163
extern ibool    srv_error_monitor_active;
 
164
 
 
165
extern ulong    srv_n_spin_wait_rounds;
 
166
extern ulong    srv_n_free_tickets_to_enter;
 
167
extern ulong    srv_thread_sleep_delay;
 
168
extern ulint    srv_spin_wait_delay;
 
169
extern ibool    srv_priority_boost;
 
170
 
 
171
extern  ulint   srv_mem_pool_size;
 
172
extern  ulint   srv_lock_table_size;
 
173
 
 
174
#ifdef UNIV_DEBUG
 
175
extern  ibool   srv_print_thread_releases;
 
176
extern  ibool   srv_print_lock_waits;
 
177
extern  ibool   srv_print_buf_io;
 
178
extern  ibool   srv_print_log_io;
 
179
extern  ibool   srv_print_latch_waits;
 
180
#else /* UNIV_DEBUG */
 
181
# define srv_print_thread_releases      FALSE
 
182
# define srv_print_lock_waits           FALSE
 
183
# define srv_print_buf_io               FALSE
 
184
# define srv_print_log_io               FALSE
 
185
# define srv_print_latch_waits          FALSE
 
186
#endif /* UNIV_DEBUG */
 
187
 
 
188
extern ulint    srv_activity_count;
 
189
extern ulint    srv_fatal_semaphore_wait_threshold;
 
190
extern ulint    srv_dml_needed_delay;
 
191
 
 
192
extern mutex_t* kernel_mutex_temp;/* mutex protecting the server, trx structs,
 
193
                                query threads, and lock table: we allocate
 
194
                                it from dynamic memory to get it to the
 
195
                                same DRAM page as other hotspot semaphores */
 
196
#define kernel_mutex (*kernel_mutex_temp)
 
197
 
 
198
#define SRV_MAX_N_IO_THREADS    100
 
199
 
 
200
/* Array of English strings describing the current state of an
 
201
i/o handler thread */
 
202
extern const char* srv_io_thread_op_info[];
 
203
extern const char* srv_io_thread_function[];
 
204
 
 
205
/* the number of the log write requests done */
 
206
extern ulint srv_log_write_requests;
 
207
 
 
208
/* the number of physical writes to the log performed */
 
209
extern ulint srv_log_writes;
 
210
 
 
211
/* amount of data written to the log files in bytes */
 
212
extern ulint srv_os_log_written;
 
213
 
 
214
/* amount of writes being done to the log files */
 
215
extern ulint srv_os_log_pending_writes;
 
216
 
 
217
/* we increase this counter, when there we don't have enough space in the
 
218
log buffer and have to flush it */
 
219
extern ulint srv_log_waits;
 
220
 
 
221
/* variable that counts amount of data read in total (in bytes) */
 
222
extern ulint srv_data_read;
 
223
 
 
224
/* here we count the amount of data written in total (in bytes) */
 
225
extern ulint srv_data_written;
 
226
 
 
227
/* this variable counts the amount of times, when the doublewrite buffer
 
228
was flushed */
 
229
extern ulint srv_dblwr_writes;
 
230
 
 
231
/* here we store the number of pages that have been flushed to the
 
232
doublewrite buffer */
 
233
extern ulint srv_dblwr_pages_written;
 
234
 
 
235
/* in this variable we store the number of write requests issued */
 
236
extern ulint srv_buf_pool_write_requests;
 
237
 
 
238
/* here we store the number of times when we had to wait for a free page
 
239
in the buffer pool. It happens when the buffer pool is full and we need
 
240
to make a flush, in order to be able to read or create a page. */
 
241
extern ulint srv_buf_pool_wait_free;
 
242
 
 
243
/* variable to count the number of pages that were written from the
 
244
buffer pool to disk */
 
245
extern ulint srv_buf_pool_flushed;
 
246
 
 
247
/* variable to count the number of buffer pool reads that led to the
 
248
reading of a disk page */
 
249
extern ulint srv_buf_pool_reads;
 
250
 
 
251
/* variable to count the number of sequential read-aheads were done */
 
252
extern ulint srv_read_ahead_seq;
 
253
 
 
254
/* variable to count the number of random read-aheads were done */
 
255
extern ulint srv_read_ahead_rnd;
 
256
 
 
257
/* In this structure we store status variables to be passed to MySQL */
 
258
typedef struct export_var_struct export_struc;
 
259
 
 
260
extern export_struc export_vars;
 
261
 
 
262
typedef struct srv_sys_struct   srv_sys_t;
 
263
 
 
264
/* The server system */
 
265
extern srv_sys_t*       srv_sys;
 
266
 
 
267
/* Alternatives for the file flush option in Unix; see the InnoDB manual
 
268
about what these mean */
 
269
#define SRV_UNIX_FSYNC          1       /* This is the default */
 
270
#define SRV_UNIX_O_DSYNC        2
 
271
#define SRV_UNIX_LITTLESYNC     3
 
272
#define SRV_UNIX_NOSYNC         4
 
273
#define SRV_UNIX_O_DIRECT       5
 
274
 
 
275
/* Alternatives for file i/o in Windows */
 
276
#define SRV_WIN_IO_NORMAL               1
 
277
#define SRV_WIN_IO_UNBUFFERED           2       /* This is the default */
 
278
 
 
279
/* Alternatives for srv_force_recovery. Non-zero values are intended
 
280
to help the user get a damaged database up so that he can dump intact
 
281
tables and rows with SELECT INTO OUTFILE. The database must not otherwise
 
282
be used with these options! A bigger number below means that all precautions
 
283
of lower numbers are included. */
 
284
 
 
285
#define SRV_FORCE_IGNORE_CORRUPT 1      /* let the server run even if it
 
286
                                        detects a corrupt page */
 
287
#define SRV_FORCE_NO_BACKGROUND 2       /* prevent the main thread from
 
288
                                        running: if a crash would occur
 
289
                                        in purge, this prevents it */
 
290
#define SRV_FORCE_NO_TRX_UNDO   3       /* do not run trx rollback after
 
291
                                        recovery */
 
292
#define SRV_FORCE_NO_IBUF_MERGE 4       /* prevent also ibuf operations:
 
293
                                        if they would cause a crash, better
 
294
                                        not do them */
 
295
#define SRV_FORCE_NO_UNDO_LOG_SCAN 5    /* do not look at undo logs when
 
296
                                        starting the database: InnoDB will
 
297
                                        treat even incomplete transactions
 
298
                                        as committed */
 
299
#define SRV_FORCE_NO_LOG_REDO   6       /* do not do the log roll-forward
 
300
                                        in connection with recovery */
 
301
 
 
302
/** Types of threads existing in the system. */
 
303
enum srv_thread_type {
 
304
        SRV_COM = 1,    /**< threads serving communication and queries */
 
305
        SRV_CONSOLE,    /**< thread serving console */
 
306
        SRV_WORKER,     /**< threads serving parallelized queries and
 
307
                        queries released from lock wait */
 
308
#if 0
 
309
        /* Utility threads */
 
310
        SRV_BUFFER,     /**< thread flushing dirty buffer blocks */
 
311
        SRV_RECOVERY,   /**< threads finishing a recovery */
 
312
        SRV_INSERT,     /**< thread flushing the insert buffer to disk */
 
313
#endif
 
314
        SRV_MASTER      /**< the master thread, (whose type number must
 
315
                        be biggest) */
 
316
};
 
317
 
 
318
/*************************************************************************
 
319
Boots Innobase server. */
 
320
UNIV_INTERN
 
321
ulint
 
322
srv_boot(void);
 
323
/*==========*/
 
324
                        /* out: DB_SUCCESS or error code */
 
325
/*************************************************************************
 
326
Initializes the server. */
 
327
UNIV_INTERN
 
328
void
 
329
srv_init(void);
 
330
/*==========*/
 
331
/*************************************************************************
 
332
Frees the OS fast mutex created in srv_boot(). */
 
333
UNIV_INTERN
 
334
void
 
335
srv_free(void);
 
336
/*==========*/
 
337
/*************************************************************************
 
338
Initializes the synchronization primitives, memory system, and the thread
 
339
local storage. */
 
340
UNIV_INTERN
 
341
void
 
342
srv_general_init(void);
 
343
/*==================*/
 
344
/*************************************************************************
 
345
Gets the number of threads in the system. */
 
346
UNIV_INTERN
 
347
ulint
 
348
srv_get_n_threads(void);
 
349
/*===================*/
 
350
/*************************************************************************
 
351
Returns the calling thread type. */
 
352
 
 
353
enum srv_thread_type
 
354
srv_get_thread_type(void);
 
355
/*=====================*/
 
356
                        /* out: SRV_COM, ... */
 
357
/*************************************************************************
 
358
Sets the info describing an i/o thread current state. */
 
359
UNIV_INTERN
 
360
void
 
361
srv_set_io_thread_op_info(
 
362
/*======================*/
 
363
        ulint           i,      /* in: the 'segment' of the i/o thread */
 
364
        const char*     str);   /* in: constant char string describing the
 
365
                                state */
 
366
/*************************************************************************
 
367
Releases threads of the type given from suspension in the thread table.
 
368
NOTE! The server mutex has to be reserved by the caller! */
 
369
UNIV_INTERN
 
370
ulint
 
371
srv_release_threads(
 
372
/*================*/
 
373
                                        /* out: number of threads
 
374
                                        released: this may be < n if
 
375
                                        not enough threads were
 
376
                                        suspended at the moment */
 
377
        enum srv_thread_type    type,   /* in: thread type */
 
378
        ulint                   n);     /* in: number of threads to release */
 
379
/*************************************************************************
 
380
The master thread controlling the server. */
 
381
UNIV_INTERN
 
382
os_thread_ret_t
 
383
srv_master_thread(
 
384
/*==============*/
 
385
                        /* out: a dummy parameter */
 
386
        void*   arg);   /* in: a dummy parameter required by
 
387
                        os_thread_create */
 
388
/***********************************************************************
 
389
Tells the Innobase server that there has been activity in the database
 
390
and wakes up the master thread if it is suspended (not sleeping). Used
 
391
in the MySQL interface. Note that there is a small chance that the master
 
392
thread stays suspended (we do not protect our operation with the kernel
 
393
mutex, for performace reasons). */
 
394
UNIV_INTERN
 
395
void
 
396
srv_active_wake_master_thread(void);
 
397
/*===============================*/
 
398
/***********************************************************************
 
399
Wakes up the master thread if it is suspended or being suspended. */
 
400
UNIV_INTERN
 
401
void
 
402
srv_wake_master_thread(void);
 
403
/*========================*/
 
404
/*************************************************************************
 
405
Puts an OS thread to wait if there are too many concurrent threads
 
406
(>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. */
 
407
UNIV_INTERN
 
408
void
 
409
srv_conc_enter_innodb(
 
410
/*==================*/
 
411
        trx_t*  trx);   /* in: transaction object associated with the
 
412
                        thread */
 
413
/*************************************************************************
 
414
This lets a thread enter InnoDB regardless of the number of threads inside
 
415
InnoDB. This must be called when a thread ends a lock wait. */
 
416
UNIV_INTERN
 
417
void
 
418
srv_conc_force_enter_innodb(
 
419
/*========================*/
 
420
        trx_t*  trx);   /* in: transaction object associated with the
 
421
                        thread */
 
422
/*************************************************************************
 
423
This must be called when a thread exits InnoDB in a lock wait or at the
 
424
end of an SQL statement. */
 
425
UNIV_INTERN
 
426
void
 
427
srv_conc_force_exit_innodb(
 
428
/*=======================*/
 
429
        trx_t*  trx);   /* in: transaction object associated with the
 
430
                        thread */
 
431
/*************************************************************************
 
432
This must be called when a thread exits InnoDB. */
 
433
UNIV_INTERN
 
434
void
 
435
srv_conc_exit_innodb(
 
436
/*=================*/
 
437
        trx_t*  trx);   /* in: transaction object associated with the
 
438
                        thread */
 
439
/*******************************************************************
 
440
Puts a MySQL OS thread to wait for a lock to be released. If an error
 
441
occurs during the wait trx->error_state associated with thr is
 
442
!= DB_SUCCESS when we return. DB_LOCK_WAIT_TIMEOUT and DB_DEADLOCK
 
443
are possible errors. DB_DEADLOCK is returned if selective deadlock
 
444
resolution chose this transaction as a victim. */
 
445
UNIV_INTERN
 
446
void
 
447
srv_suspend_mysql_thread(
 
448
/*=====================*/
 
449
        que_thr_t*      thr);   /* in: query thread associated with the MySQL
 
450
                                OS thread */
 
451
/************************************************************************
 
452
Releases a MySQL OS thread waiting for a lock to be released, if the
 
453
thread is already suspended. */
 
454
UNIV_INTERN
 
455
void
 
456
srv_release_mysql_thread_if_suspended(
 
457
/*==================================*/
 
458
        que_thr_t*      thr);   /* in: query thread associated with the
 
459
                                MySQL OS thread  */
 
460
/*************************************************************************
 
461
A thread which wakes up threads whose lock wait may have lasted too long.
 
462
This also prints the info output by various InnoDB monitors. */
 
463
UNIV_INTERN
 
464
os_thread_ret_t
 
465
srv_lock_timeout_and_monitor_thread(
 
466
/*================================*/
 
467
                        /* out: a dummy parameter */
 
468
        void*   arg);   /* in: a dummy parameter required by
 
469
                        os_thread_create */
 
470
/*************************************************************************
 
471
A thread which prints warnings about semaphore waits which have lasted
 
472
too long. These can be used to track bugs which cause hangs. */
 
473
UNIV_INTERN
 
474
os_thread_ret_t
 
475
srv_error_monitor_thread(
 
476
/*=====================*/
 
477
                        /* out: a dummy parameter */
 
478
        void*   arg);   /* in: a dummy parameter required by
 
479
                        os_thread_create */
 
480
/**********************************************************************
 
481
Outputs to a file the output of the InnoDB Monitor. */
 
482
UNIV_INTERN
 
483
void
 
484
srv_printf_innodb_monitor(
 
485
/*======================*/
 
486
        FILE*   file,           /* in: output stream */
 
487
        ulint*  trx_start,      /* out: file position of the start of
 
488
                                the list of active transactions */
 
489
        ulint*  trx_end);       /* out: file position of the end of
 
490
                                the list of active transactions */
 
491
 
 
492
/**********************************************************************
 
493
Function to pass InnoDB status variables to MySQL */
 
494
UNIV_INTERN
 
495
void
 
496
srv_export_innodb_status(void);
 
497
/*=====================*/
 
498
 
 
499
/* Thread slot in the thread table */
 
500
typedef struct srv_slot_struct  srv_slot_t;
 
501
 
 
502
/* Thread table is an array of slots */
 
503
typedef srv_slot_t      srv_table_t;
 
504
 
 
505
/* In this structure we store status variables to be passed to MySQL */
 
506
struct export_var_struct{
 
507
        ulint innodb_data_pending_reads;
 
508
        ulint innodb_data_pending_writes;
 
509
        ulint innodb_data_pending_fsyncs;
 
510
        ulint innodb_data_fsyncs;
 
511
        ulint innodb_data_read;
 
512
        ulint innodb_data_writes;
 
513
        ulint innodb_data_written;
 
514
        ulint innodb_data_reads;
 
515
        ulint innodb_buffer_pool_pages_total;
 
516
        ulint innodb_buffer_pool_pages_data;
 
517
        ulint innodb_buffer_pool_pages_dirty;
 
518
        ulint innodb_buffer_pool_pages_misc;
 
519
        ulint innodb_buffer_pool_pages_free;
 
520
        ulint innodb_buffer_pool_pages_latched;
 
521
        ulint innodb_buffer_pool_read_requests;
 
522
        ulint innodb_buffer_pool_reads;
 
523
        ulint innodb_buffer_pool_wait_free;
 
524
        ulint innodb_buffer_pool_pages_flushed;
 
525
        ulint innodb_buffer_pool_write_requests;
 
526
        ulint innodb_buffer_pool_read_ahead_seq;
 
527
        ulint innodb_buffer_pool_read_ahead_rnd;
 
528
        ulint innodb_dblwr_pages_written;
 
529
        ulint innodb_dblwr_writes;
 
530
        ulint innodb_log_waits;
 
531
        ulint innodb_log_write_requests;
 
532
        ulint innodb_log_writes;
 
533
        ulint innodb_os_log_written;
 
534
        ulint innodb_os_log_fsyncs;
 
535
        ulint innodb_os_log_pending_writes;
 
536
        ulint innodb_os_log_pending_fsyncs;
 
537
        ulint innodb_page_size;
 
538
        ulint innodb_pages_created;
 
539
        ulint innodb_pages_read;
 
540
        ulint innodb_pages_written;
 
541
        ulint innodb_row_lock_waits;
 
542
        ulint innodb_row_lock_current_waits;
 
543
        ib_int64_t innodb_row_lock_time;
 
544
        ulint innodb_row_lock_time_avg;
 
545
        ulint innodb_row_lock_time_max;
 
546
        ulint innodb_rows_read;
 
547
        ulint innodb_rows_inserted;
 
548
        ulint innodb_rows_updated;
 
549
        ulint innodb_rows_deleted;
 
550
};
 
551
 
 
552
/* The server system struct */
 
553
struct srv_sys_struct{
 
554
        srv_table_t*    threads;        /* server thread table */
 
555
        UT_LIST_BASE_NODE_T(que_thr_t)
 
556
                        tasks;          /* task queue */
 
557
        dict_index_t*   dummy_ind1;     /* dummy index for old-style
 
558
                                        supremum and infimum records */
 
559
        dict_index_t*   dummy_ind2;     /* dummy index for new-style
 
560
                                        supremum and infimum records */
 
561
};
 
562
 
 
563
extern ulint    srv_n_threads_active[];
 
564
 
 
565
#endif
 
566