1
/*****************************************************************************
3
Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved.
4
Copyright (c) 2008, Google Inc.
5
Copyright (c) 2009, Percona Inc.
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.
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
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.
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.
28
You should have received a copy of the GNU General Public License along with
29
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
30
St, Fifth Floor, Boston, MA 02110-1301 USA
32
*****************************************************************************/
34
/********************************************************************//**
1
/************************************************************************
36
2
Starts the InnoDB database server
4
(c) 1996-2000 Innobase Oy
38
6
Created 2/16/1996 Heikki Tuuri
39
7
*************************************************************************/
10
#include "sync0sync.h"
41
11
#include "ut0mem.h"
42
12
#include "mem0mem.h"
43
14
#include "data0data.h"
44
15
#include "data0type.h"
45
16
#include "dict0dict.h"
46
17
#include "buf0buf.h"
47
20
#include "os0file.h"
48
21
#include "os0thread.h"
49
22
#include "fil0fil.h"
50
23
#include "fsp0fsp.h"
51
24
#include "rem0rec.h"
52
26
#include "mtr0mtr.h"
53
27
#include "log0log.h"
54
28
#include "log0recv.h"
55
29
#include "page0page.h"
56
30
#include "page0cur.h"
57
31
#include "trx0trx.h"
32
#include "dict0boot.h"
33
#include "dict0load.h"
58
34
#include "trx0sys.h"
35
#include "dict0crea.h"
59
36
#include "btr0btr.h"
60
38
#include "btr0cur.h"
61
40
#include "rem0rec.h"
44
#include "lock0lock.h"
46
#include "trx0purge.h"
51
#include "row0mysql.h"
52
#include "lock0lock.h"
62
53
#include "ibuf0ibuf.h"
54
#include "pars0pars.h"
63
56
#include "srv0start.h"
65
#ifndef UNIV_HOTBACKUP
67
# include "sync0sync.h"
70
# include "dict0boot.h"
71
# include "dict0load.h"
73
# include "usr0sess.h"
74
# include "lock0lock.h"
75
# include "trx0roll.h"
76
# include "trx0purge.h"
77
# include "lock0lock.h"
78
# include "pars0pars.h"
81
# include "dict0crea.h"
86
# include "row0mysql.h"
87
# include "btr0pcur.h"
89
# include "os0sync.h" /* for INNODB_RW_LOCKS_USE_ATOMICS */
90
# include "zlib.h" /* for ZLIB_VERSION */
95
/** Log sequence number immediately after startup */
59
/* Log sequence number immediately after startup */
96
60
UNIV_INTERN ib_uint64_t srv_start_lsn;
97
/** Log sequence number at shutdown */
61
/* Log sequence number at shutdown */
98
62
UNIV_INTERN ib_uint64_t srv_shutdown_lsn;
100
64
#ifdef HAVE_DARWIN_THREADS
101
65
# include <sys/utsname.h>
102
/** TRUE if the F_FULLFSYNC option is available */
103
66
UNIV_INTERN ibool srv_have_fullfsync = FALSE;
106
/** TRUE if a raw partition is in use */
107
69
UNIV_INTERN ibool srv_start_raw_disk_in_use = FALSE;
109
/** TRUE if the server is being started, before rolling back any
110
incomplete transactions */
111
71
UNIV_INTERN ibool srv_startup_is_before_trx_rollback_phase = FALSE;
112
/** TRUE if the server is being started */
113
72
UNIV_INTERN ibool srv_is_being_started = FALSE;
114
/** TRUE if the server was successfully started */
115
73
UNIV_INTERN ibool srv_was_started = FALSE;
116
/** TRUE if innobase_start_or_create_for_mysql() has been called */
74
#ifndef UNIV_HOTBACKUP
117
75
static ibool srv_start_has_been_called = FALSE;
119
/** At a shutdown this value climbs from SRV_SHUTDOWN_NONE to
120
SRV_SHUTDOWN_CLEANUP and then to SRV_SHUTDOWN_LAST_PHASE, and so on */
121
UNIV_INTERN enum srv_shutdown_state srv_shutdown_state = SRV_SHUTDOWN_NONE;
123
/** Files comprising the system tablespace */
76
#endif /* !UNIV_HOTBACKUP */
78
/* At a shutdown the value first climbs to SRV_SHUTDOWN_CLEANUP
79
and then to SRV_SHUTDOWN_LAST_PHASE */
80
UNIV_INTERN ulint srv_shutdown_state = 0;
82
#ifndef UNIV_HOTBACKUP
124
83
static os_file_t files[1000];
126
/** Mutex protecting the ios count */
127
85
static mutex_t ios_mutex;
128
/** Count of I/O operations in io_handler_thread() */
131
/** io_handler_thread parameters for thread identification */
132
static ulint n[SRV_MAX_N_IO_THREADS + 6];
133
/** io_handler_thread identifiers */
134
static os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 6];
88
static ulint n[SRV_MAX_N_IO_THREADS + 5];
89
static os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 5];
136
/** We use this mutex to test the return value of pthread_mutex_trylock
91
/* We use this mutex to test the return value of pthread_mutex_trylock
137
92
on successful locking. HP-UX does NOT return 0, though Linux et al do. */
138
93
static os_fast_mutex_t srv_os_test_mutex;
140
/** Name of srv_monitor_file */
95
/* Name of srv_monitor_file */
141
96
static char* srv_monitor_file_name;
142
97
#endif /* !UNIV_HOTBACKUP */
145
99
#define SRV_N_PENDING_IOS_PER_THREAD OS_AIO_N_PENDING_IOS_PER_THREAD
146
100
#define SRV_MAX_N_PENDING_SYNC_IOS 100
148
#ifdef UNIV_PFS_THREAD
149
/* Keys to register InnoDB threads with performance schema */
150
UNIV_INTERN mysql_pfs_key_t io_handler_thread_key;
151
UNIV_INTERN mysql_pfs_key_t srv_lock_timeout_thread_key;
152
UNIV_INTERN mysql_pfs_key_t srv_error_monitor_thread_key;
153
UNIV_INTERN mysql_pfs_key_t srv_monitor_thread_key;
154
UNIV_INTERN mysql_pfs_key_t srv_master_thread_key;
155
#endif /* UNIV_PFS_THREAD */
157
#ifdef UNIV_PFS_MUTEX
158
/* Key to register ios_mutex_key with performance schema */
159
UNIV_INTERN mysql_pfs_key_t ios_mutex_key;
160
#endif /* UNIV_PFS_MUTEX */
162
/*********************************************************************//**
163
Convert a numeric string that optionally ends in G or M, to a number
164
containing megabytes.
165
@return next character in string */
103
/* Avoid warnings when using purify */
106
static int inno_bcmp(register const char *s1, register const char *s2,
109
while ((len-- != 0) && (*s1++ == *s2++))
114
#define memcmp(A,B,C) inno_bcmp((A),(B),(C))
168
119
srv_parse_megabytes(
169
120
/*================*/
170
char* str, /*!< in: string containing a quantity in bytes */
171
ulint* megs) /*!< out: the number in megabytes */
121
/* out: next character in string */
122
char* str, /* in: string containing a quantity in bytes */
123
ulint* megs) /* out: the number in megabytes */
196
/*********************************************************************//**
148
/*************************************************************************
197
149
Reads the data files and their sizes from a character string given in
199
@return TRUE if ok, FALSE on parse error */
202
153
srv_parse_data_file_paths_and_sizes(
203
154
/*================================*/
204
char* str) /*!< in/out: the data file path string */
155
/* out: TRUE if ok, FALSE if parsing
157
char* str, /* in: the data file path string */
158
char*** data_file_names, /* out, own: array of data file
160
ulint** data_file_sizes, /* out, own: array of data file sizes
162
ulint** data_file_is_raw_partition,/* out, own: array of flags
163
showing which data files are raw
165
ulint* n_data_files, /* out: number of data files */
166
ibool* is_auto_extending, /* out: TRUE if the last data file is
168
ulint* max_auto_extend_size) /* out: max auto extend size for the
169
last file if specified, 0 if not */
211
srv_auto_extend_last_data_file = FALSE;
212
srv_last_file_size_max = 0;
213
srv_data_file_names = NULL;
214
srv_data_file_sizes = NULL;
215
srv_data_file_is_raw_partition = NULL;
176
*is_auto_extending = FALSE;
177
*max_auto_extend_size = 0;
476
/*************************************************************************
477
Adds a slash or a backslash to the end of a string if it is missing
478
and the string is not empty. */
481
srv_add_path_separator_if_needed(
482
/*=============================*/
483
/* out: string which has the separator if the
484
string is not empty */
485
char* str) /* in: null-terminated character string */
488
ulint len = ut_strlen(str);
490
if (len == 0 || str[len - 1] == SRV_PATH_SEPARATOR) {
495
out_str = ut_malloc(len + 2);
496
memcpy(out_str, str, len);
497
out_str[len] = SRV_PATH_SEPARATOR;
498
out_str[len + 1] = 0;
537
503
#ifndef UNIV_HOTBACKUP
538
/*********************************************************************//**
504
/*************************************************************************
539
505
Calculates the low 32 bits when a file size which is given as a number
540
database pages is converted to the number of bytes.
541
@return low 32 bytes of file size when expressed in bytes */
506
database pages is converted to the number of bytes. */
546
ulint file_size) /*!< in: file size in database pages */
511
/* out: low 32 bytes of file size when
512
expressed in bytes */
513
ulint file_size) /* in: file size in database pages */
548
515
return(0xFFFFFFFFUL & (file_size << UNIV_PAGE_SIZE_SHIFT));
551
/*********************************************************************//**
518
/*************************************************************************
552
519
Calculates the high 32 bits when a file size which is given as a number
553
database pages is converted to the number of bytes.
554
@return high 32 bytes of file size when expressed in bytes */
520
database pages is converted to the number of bytes. */
559
ulint file_size) /*!< in: file size in database pages */
525
/* out: high 32 bytes of file size when
526
expressed in bytes */
527
ulint file_size) /* in: file size in database pages */
561
529
return(file_size >> (32 - UNIV_PAGE_SIZE_SHIFT));
564
/*********************************************************************//**
565
Creates or opens the log files and closes them.
566
@return DB_SUCCESS or error code */
532
/*************************************************************************
533
Creates or opens the log files and closes them. */
569
536
open_or_create_log_file(
570
537
/*====================*/
571
ibool create_new_db, /*!< in: TRUE if we should create a
538
/* out: DB_SUCCESS or error code */
539
ibool create_new_db, /* in: TRUE if we should create a
573
ibool* log_file_created, /*!< out: TRUE if new log file
541
ibool* log_file_created, /* out: TRUE if new log file
575
ibool log_file_has_been_opened,/*!< in: TRUE if a log file has been
543
ibool log_file_has_been_opened,/* in: TRUE if a log file has been
576
544
opened before: then it is an error
577
545
to try to create another log file */
578
ulint k, /*!< in: log group number */
579
ulint i) /*!< in: log file number in group */
546
ulint k, /* in: log group number */
547
ulint i) /* in: log file number in group */
584
552
char name[10000];
587
554
UT_NOT_USED(create_new_db);
589
556
*log_file_created = FALSE;
591
558
srv_normalize_path_for_win(srv_log_group_home_dirs[k]);
593
dirnamelen = strlen(srv_log_group_home_dirs[k]);
594
ut_a(dirnamelen < (sizeof name) - 10 - sizeof "ib_logfile");
595
memcpy(name, srv_log_group_home_dirs[k], dirnamelen);
597
/* Add a path separator if needed. */
598
if (dirnamelen && name[dirnamelen - 1] != SRV_PATH_SEPARATOR) {
599
name[dirnamelen++] = SRV_PATH_SEPARATOR;
602
sprintf(name + dirnamelen, "%s%lu", "ib_logfile", (ulong) i);
604
files[i] = os_file_create(innodb_file_log_key, name,
605
OS_FILE_CREATE, OS_FILE_NORMAL,
559
srv_log_group_home_dirs[k] = srv_add_path_separator_if_needed(
560
srv_log_group_home_dirs[k]);
562
ut_a(strlen(srv_log_group_home_dirs[k])
563
< (sizeof name) - 10 - sizeof "ib_logfile");
564
sprintf(name, "%s%s%lu", srv_log_group_home_dirs[k],
565
"ib_logfile", (ulong) i);
567
files[i] = os_file_create(name, OS_FILE_CREATE, OS_FILE_NORMAL,
606
568
OS_LOG_FILE, &ret);
607
569
if (ret == FALSE) {
608
570
if (os_file_get_last_error(FALSE) != OS_FILE_ALREADY_EXISTS
721
682
return(DB_SUCCESS);
724
/*********************************************************************//**
725
Creates or opens database data files and closes them.
726
@return DB_SUCCESS or error code */
685
/*************************************************************************
686
Creates or opens database data files and closes them. */
729
689
open_or_create_data_files(
730
690
/*======================*/
731
ibool* create_new_db, /*!< out: TRUE if new database should be
691
/* out: DB_SUCCESS or error code */
692
ibool* create_new_db, /* out: TRUE if new database should be
733
694
#ifdef UNIV_LOG_ARCHIVE
734
ulint* min_arch_log_no,/*!< out: min of archived log
695
ulint* min_arch_log_no,/* out: min of archived log
735
696
numbers in data files */
736
ulint* max_arch_log_no,/*!< out: max of archived log
697
ulint* max_arch_log_no,/* out: max of archived log
737
698
numbers in data files */
738
699
#endif /* UNIV_LOG_ARCHIVE */
739
ib_uint64_t* min_flushed_lsn,/*!< out: min of flushed lsn
740
values in data files */
741
ib_uint64_t* max_flushed_lsn,/*!< out: max of flushed lsn
742
values in data files */
743
ulint* sum_of_new_sizes)/*!< out: sum of sizes of the
700
ib_uint64_t* min_flushed_lsn,/* out: min of flushed lsn
701
values in data files */
702
ib_uint64_t* max_flushed_lsn,/* out: max of flushed lsn
703
values in data files */
704
ulint* sum_of_new_sizes)/* out: sum of sizes of the
744
705
new files added */
764
725
*create_new_db = FALSE;
766
727
srv_normalize_path_for_win(srv_data_home);
728
srv_data_home = srv_add_path_separator_if_needed(srv_data_home);
768
730
for (i = 0; i < srv_n_data_files; i++) {
771
731
srv_normalize_path_for_win(srv_data_file_names[i]);
772
dirnamelen = strlen(srv_data_home);
774
ut_a(dirnamelen + strlen(srv_data_file_names[i])
733
ut_a(strlen(srv_data_home) + strlen(srv_data_file_names[i])
775
734
< (sizeof name) - 1);
776
memcpy(name, srv_data_home, dirnamelen);
777
/* Add a path separator if needed. */
778
if (dirnamelen && name[dirnamelen - 1] != SRV_PATH_SEPARATOR) {
779
name[dirnamelen++] = SRV_PATH_SEPARATOR;
782
strcpy(name + dirnamelen, srv_data_file_names[i]);
735
sprintf(name, "%s%s", srv_data_home, srv_data_file_names[i]);
784
737
if (srv_data_file_is_raw_partition[i] == 0) {
786
739
/* First we try to create the file: if it already
787
740
exists, ret will get value FALSE */
789
files[i] = os_file_create(innodb_file_data_key,
790
name, OS_FILE_CREATE,
742
files[i] = os_file_create(name, OS_FILE_CREATE,
792
744
OS_DATA_FILE, &ret);
1147
1072
srv_is_being_started = TRUE;
1148
1073
srv_startup_is_before_trx_rollback_phase = TRUE;
1074
os_aio_use_native_aio = FALSE;
1151
switch (os_get_os_version()) {
1077
if (os_get_os_version() == OS_WIN95
1078
|| os_get_os_version() == OS_WIN31
1079
|| os_get_os_version() == OS_WINNT) {
1155
1081
/* On Win 95, 98, ME, Win32 subsystem for Windows 3.1,
1156
1082
and NT use simulated aio. In NT Windows provides async i/o,
1157
1083
but when run in conjunction with InnoDB Hot Backup, it seemed
1158
1084
to corrupt the data files. */
1160
srv_use_native_aio = FALSE;
1165
/* On 2000 and XP, async IO is available. */
1166
srv_use_native_aio = TRUE;
1170
/* Vista and later have both async IO and condition variables */
1171
srv_use_native_aio = TRUE;
1172
srv_use_native_conditions = TRUE;
1176
#elif defined(LINUX_NATIVE_AIO)
1178
if (srv_use_native_aio) {
1179
ut_print_timestamp(stderr);
1181
" InnoDB: Using Linux native AIO\n");
1184
/* Currently native AIO is supported only on windows and linux
1185
and that also when the support is compiled in. In all other
1186
cases, we ignore the setting of innodb_use_native_aio. */
1187
srv_use_native_aio = FALSE;
1086
os_aio_use_native_aio = FALSE;
1088
/* On Win 2000 and XP use async i/o */
1089
os_aio_use_native_aio = TRUE;
1191
1092
if (srv_file_flush_method_str == NULL) {
1192
1093
/* These are the default options */
1288
mutex_create(srv_dict_tmpfile_mutex_key,
1289
&srv_dict_tmpfile_mutex, SYNC_DICT_OPERATION);
1193
mutex_create(&srv_dict_tmpfile_mutex, SYNC_DICT_OPERATION);
1291
1195
srv_dict_tmpfile = os_file_create_tmpfile();
1292
1196
if (!srv_dict_tmpfile) {
1293
1197
return(DB_ERROR);
1296
mutex_create(srv_misc_tmpfile_mutex_key,
1297
&srv_misc_tmpfile_mutex, SYNC_ANY_LATCH);
1200
mutex_create(&srv_misc_tmpfile_mutex, SYNC_ANY_LATCH);
1299
1202
srv_misc_tmpfile = os_file_create_tmpfile();
1300
1203
if (!srv_misc_tmpfile) {
1301
1204
return(DB_ERROR);
1304
/* innodb_file_io_threads used to be user settable.
1305
It is now just a combination of read_io_threads and
1306
write_io_threads that is set by innodb internally. */
1308
/* Now overwrite the value on srv_n_file_io_threads */
1309
srv_n_file_io_threads = 2 + srv_n_read_io_threads
1310
+ srv_n_write_io_threads;
1312
ut_a(srv_n_file_io_threads <= SRV_MAX_N_IO_THREADS);
1314
/* TODO: Investigate if SRV_N_PENDING_IOS_PER_THREAD (32) limit
1315
still applies to windows. */
1316
if (!srv_use_native_aio) {
1317
io_limit = 8 * SRV_N_PENDING_IOS_PER_THREAD;
1319
io_limit = SRV_N_PENDING_IOS_PER_THREAD;
1322
os_aio_init(io_limit,
1323
srv_n_read_io_threads,
1324
srv_n_write_io_threads,
1325
SRV_MAX_N_PENDING_SYNC_IOS);
1327
fil_init(srv_file_per_table ? 50000 : 5000,
1328
srv_max_n_open_files);
1330
/* Print time to initialize the buffer pool */
1331
ut_print_timestamp(stderr);
1333
" InnoDB: Initializing buffer pool, size =");
1335
if (srv_buf_pool_size >= 1024 * 1024 * 1024) {
1338
((double) srv_buf_pool_size) / (1024 * 1024 * 1024));
1342
((double) srv_buf_pool_size) / (1024 * 1024));
1345
err = buf_pool_init(srv_buf_pool_size, srv_buf_pool_instances);
1347
ut_print_timestamp(stderr);
1349
" InnoDB: Completed initialization of buffer pool\n");
1351
if (err != DB_SUCCESS) {
1207
/* Restrict the maximum number of file i/o threads */
1208
if (srv_n_file_io_threads > SRV_MAX_N_IO_THREADS) {
1210
srv_n_file_io_threads = SRV_MAX_N_IO_THREADS;
1213
if (!os_aio_use_native_aio) {
1214
/* In simulated aio we currently have use only for 4 threads */
1215
srv_n_file_io_threads = 4;
1217
os_aio_init(8 * SRV_N_PENDING_IOS_PER_THREAD
1218
* srv_n_file_io_threads,
1219
srv_n_file_io_threads,
1220
SRV_MAX_N_PENDING_SYNC_IOS);
1222
os_aio_init(SRV_N_PENDING_IOS_PER_THREAD
1223
* srv_n_file_io_threads,
1224
srv_n_file_io_threads,
1225
SRV_MAX_N_PENDING_SYNC_IOS);
1228
fil_init(srv_max_n_open_files);
1230
ret = buf_pool_init();
1352
1233
fprintf(stderr,
1353
1234
"InnoDB: Fatal error: cannot allocate the memory"
1354
1235
" for the buffer pool\n");
1715
1591
/* fprintf(stderr, "Max allowed record size %lu\n",
1716
1592
page_get_free_space_of_empty() / 2); */
1718
if (trx_doublewrite == NULL) {
1719
/* Create the doublewrite buffer to a new tablespace */
1721
trx_sys_create_doublewrite_buf();
1724
/* Here the double write buffer has already been created and so
1725
any new rollback segments will be allocated after the double
1726
write buffer. The default segment should already exist.
1727
We create the new segments only if it's a new database or
1728
the database was shutdown cleanly. */
1730
/* Note: When creating the extra rollback segments during an upgrade
1731
we violate the latching order, even if the change buffer is empty.
1732
We make an exception in sync0sync.c and check srv_is_being_started
1733
for that violation. It cannot create a deadlock because we are still
1734
running in single threaded mode essentially. Only the IO threads
1735
should be running at this stage. */
1737
trx_sys_create_rsegs(TRX_SYS_N_RSEGS - 1);
1739
/* Create the thread which watches the timeouts for lock waits */
1740
os_thread_create(&srv_lock_timeout_thread, NULL,
1594
/* Create the thread which watches the timeouts for lock waits
1595
and prints InnoDB monitor info */
1597
os_thread_create(&srv_lock_timeout_and_monitor_thread, NULL,
1741
1598
thread_ids + 2 + SRV_MAX_N_IO_THREADS);
1743
1600
/* Create the thread which warns of long semaphore waits */
1744
1601
os_thread_create(&srv_error_monitor_thread, NULL,
1745
1602
thread_ids + 3 + SRV_MAX_N_IO_THREADS);
1747
/* Create the thread which prints InnoDB monitor info */
1748
os_thread_create(&srv_monitor_thread, NULL,
1749
thread_ids + 4 + SRV_MAX_N_IO_THREADS);
1751
1603
srv_is_being_started = FALSE;
1605
if (trx_doublewrite == NULL) {
1606
/* Create the doublewrite buffer to a new tablespace */
1608
trx_sys_create_doublewrite_buf();
1753
1611
err = dict_create_or_check_foreign_constraint_tables();
1755
1613
if (err != DB_SUCCESS) {
2073
1923
srv_misc_tmpfile = 0;
2076
/* This must be disabled before closing the buffer pool
2077
and closing the data dictionary. */
2078
btr_search_disable();
2084
1926
trx_sys_file_format_close();
2087
1928
mutex_free(&srv_monitor_file_mutex);
2088
1929
mutex_free(&srv_dict_tmpfile_mutex);
2089
1930
mutex_free(&srv_misc_tmpfile_mutex);
2091
btr_search_sys_free();
2093
1932
/* 3. Free all InnoDB's own mutexes and the os_fast_mutexes inside
1936
/* 4. Free the os_conc_mutex and all os_events and os_mutexes */
2100
/* 4. Free the os_conc_mutex and all os_events and os_mutexes */
2102
1939
os_sync_free();
2104
/* 5. Free all allocated memory */
2108
buf_pool_free(srv_buf_pool_instances);
2111
/* ut_free_all_mem() frees all allocated memory not freed yet
2112
in shutdown, and it will also free the ut_list_mutex, so it
2113
should be the last one for all operation */
1941
/* Check that all read views are closed except read view owned
1944
if (UT_LIST_GET_LEN(trx_sys->view_list) > 1) {
1946
"InnoDB: Error: all read views were not closed"
1947
" before shutdown:\n"
1948
"InnoDB: %lu read views open \n",
1949
UT_LIST_GET_LEN(trx_sys->view_list) - 1);
1952
/* 5. Free all allocated memory and the os_fast_mutex created in
2114
1956
ut_free_all_mem();
2116
1958
if (os_thread_count != 0