1
1
/*****************************************************************************
3
Copyright (C) 1996, 2010, Innobase Oy. All Rights Reserved.
4
Copyright (C) 2008, Google Inc.
5
Copyright (C) 2009, Percona Inc.
3
Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
4
Copyright (c) 2008, Google Inc.
7
6
Portions of this file contain modifications contributed and copyrighted by
8
7
Google, Inc. Those modifications are gratefully acknowledged and are described
10
9
incorporated with their permission, and subject to the conditions contained in
11
10
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
12
This program is free software; you can redistribute it and/or modify it under
21
13
the terms of the GNU General Public License as published by the Free Software
22
14
Foundation; version 2 of the License.
30
22
St, Fifth Floor, Boston, MA 02110-1301 USA
32
24
*****************************************************************************/
25
/***********************************************************************
27
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
28
Copyright (c) 2009, Percona Inc.
30
Portions of this file contain modifications contributed and copyrighted
31
by Percona Inc.. Those modifications are
32
gratefully acknowledged and are described briefly in the InnoDB
33
documentation. The contributions by Percona Inc. are incorporated with
34
their permission, and subject to the conditions contained in the file
37
This program is free software; you can redistribute it and/or modify it
38
under the terms of the GNU General Public License as published by the
39
Free Software Foundation; version 2 of the License.
41
This program is distributed in the hope that it will be useful, but
42
WITHOUT ANY WARRANTY; without even the implied warranty of
43
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
44
Public License for more details.
46
You should have received a copy of the GNU General Public License along
47
with this program; if not, write to the Free Software Foundation, Inc.,
48
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
50
***********************************************************************/
34
52
/********************************************************************//**
35
53
@file srv/srv0start.c
87
105
# include "btr0pcur.h"
88
106
# include "thr0loc.h"
89
107
# include "os0sync.h" /* for INNODB_RW_LOCKS_USE_ATOMICS */
90
# include "zlib.h" /* for ZLIB_VERSION */
92
109
#include <errno.h>
93
110
#include <unistd.h>
95
#include <drizzled/gettext.h>
96
#include <drizzled/errmsg_print.h>
98
112
/** Log sequence number immediately after startup */
99
113
UNIV_INTERN ib_uint64_t srv_start_lsn;
100
114
/** Log sequence number at shutdown */
126
140
/** Files comprising the system tablespace */
127
141
static os_file_t files[1000];
143
/** Mutex protecting the ios count */
144
static mutex_t ios_mutex;
145
/** Count of I/O operations in io_handler_thread() */
129
148
/** io_handler_thread parameters for thread identification */
130
static ulint n[SRV_MAX_N_IO_THREADS + 6];
149
static ulint n[SRV_MAX_N_IO_THREADS + 5];
131
150
/** io_handler_thread identifiers */
132
static os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 6];
151
static os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 5];
134
153
/** We use this mutex to test the return value of pthread_mutex_trylock
135
154
on successful locking. HP-UX does NOT return 0, though Linux et al do. */
143
162
#define SRV_N_PENDING_IOS_PER_THREAD OS_AIO_N_PENDING_IOS_PER_THREAD
144
163
#define SRV_MAX_N_PENDING_SYNC_IOS 100
146
#ifdef UNIV_PFS_THREAD
147
/* Keys to register InnoDB threads with performance schema */
148
UNIV_INTERN mysql_pfs_key_t io_handler_thread_key;
149
UNIV_INTERN mysql_pfs_key_t srv_lock_timeout_thread_key;
150
UNIV_INTERN mysql_pfs_key_t srv_error_monitor_thread_key;
151
UNIV_INTERN mysql_pfs_key_t srv_monitor_thread_key;
152
UNIV_INTERN mysql_pfs_key_t srv_master_thread_key;
153
#endif /* UNIV_PFS_THREAD */
155
166
/*********************************************************************//**
156
167
Convert a numeric string that optionally ends in G or M, to a number
285
srv_data_file_names = static_cast<char **>(malloc(i * sizeof *srv_data_file_names));
286
srv_data_file_sizes = static_cast<ulint *>(malloc(i * sizeof *srv_data_file_sizes));
287
srv_data_file_is_raw_partition = static_cast<ulint *>(malloc(
288
i * sizeof *srv_data_file_is_raw_partition));
296
srv_data_file_names = malloc(i * sizeof *srv_data_file_names);
297
srv_data_file_sizes = malloc(i * sizeof *srv_data_file_sizes);
298
srv_data_file_is_raw_partition = malloc(
299
i * sizeof *srv_data_file_is_raw_partition);
290
301
srv_n_data_files = i;
483
491
fprintf(stderr, "Io handler thread %lu starts, id %lu\n", segment,
484
492
os_thread_pf(os_thread_get_curr_id()));
487
#ifdef UNIV_PFS_THREAD
488
pfs_register_thread(io_handler_thread_key);
489
#endif /* UNIV_PFS_THREAD */
491
while (srv_shutdown_state != SRV_SHUTDOWN_EXIT_THREADS) {
492
495
fil_aio_wait(segment);
497
mutex_enter(&ios_mutex);
499
mutex_exit(&ios_mutex);
495
501
/* We count the number of threads in os_thread_exit(). A created
496
502
thread should always use that to exit and not use return() to exit.
497
503
The thread actually never comes here because it is exited in an
498
504
os_event_wait(). */
505
#if (!defined(__SUNPRO_C) && !defined(__SUNPRO_CC))
506
/* This is disabled on SunStudio as it (rightly) gives a warning
507
about this code never being reached. See the loop above? No exit
509
thr_local_free(os_thread_get_curr_id());
501
514
#endif /* !UNIV_HOTBACKUP */
593
606
sprintf(name + dirnamelen, "%s%lu", "ib_logfile", (ulong) i);
595
files[i] = os_file_create(innodb_file_log_key, name,
596
OS_FILE_CREATE, OS_FILE_NORMAL,
608
files[i] = os_file_create(name, OS_FILE_CREATE, OS_FILE_NORMAL,
597
609
OS_LOG_FILE, &ret);
598
610
if (ret == FALSE) {
599
611
if (os_file_get_last_error(FALSE) != OS_FILE_ALREADY_EXISTS
604
616
&& os_file_get_last_error(FALSE) != 100
607
drizzled::errmsg_printf(drizzled::error::ERROR,
608
"InnoDB: Error in creating or opening %s", name);
620
"InnoDB: Error in creating"
621
" or opening %s\n", name);
613
files[i] = os_file_create(innodb_file_log_key, name,
614
OS_FILE_OPEN, OS_FILE_AIO,
626
files[i] = os_file_create(name, OS_FILE_OPEN, OS_FILE_AIO,
615
627
OS_LOG_FILE, &ret);
617
drizzled::errmsg_printf(drizzled::error::ERROR,
618
"InnoDB: Error in opening %s.", name);
630
"InnoDB: Error in opening %s\n", name);
620
632
return(DB_ERROR);
626
638
if (size != srv_calc_low32(srv_log_file_size)
627
639
|| size_high != srv_calc_high32(srv_log_file_size)) {
629
drizzled::errmsg_printf(drizzled::error::ERROR,
630
"InnoDB: Error: log file %s is of different size %lu %lu bytes than specified in the .cnf"
631
" file %lu %lu bytes!",
632
name, (ulong) size_high, (ulong) size,
633
(ulong) srv_calc_high32(srv_log_file_size),
634
(ulong) srv_calc_low32(srv_log_file_size));
642
"InnoDB: Error: log file %s is"
643
" of different size %lu %lu bytes\n"
644
"InnoDB: than specified in the .cnf"
645
" file %lu %lu bytes!\n",
646
name, (ulong) size_high, (ulong) size,
647
(ulong) srv_calc_high32(srv_log_file_size),
648
(ulong) srv_calc_low32(srv_log_file_size));
636
650
return(DB_ERROR);
639
653
*log_file_created = TRUE;
641
drizzled::errmsg_printf(drizzled::error::INFO,
642
"InnoDB: Log file %s did not exist: new to be created",
655
ut_print_timestamp(stderr);
658
" InnoDB: Log file %s did not exist:"
659
" new to be created\n",
644
661
if (log_file_has_been_opened) {
646
663
return(DB_ERROR);
649
drizzled::errmsg_printf(drizzled::error::INFO,
650
"InnoDB: Setting log file %s size to %lu MB",
651
name, (ulong) srv_log_file_size
652
>> (20 - UNIV_PAGE_SIZE_SHIFT));
666
fprintf(stderr, "InnoDB: Setting log file %s size to %lu MB\n",
667
name, (ulong) srv_log_file_size
668
>> (20 - UNIV_PAGE_SIZE_SHIFT));
654
drizzled::errmsg_printf(drizzled::error::INFO,
655
"InnoDB: Database physically writes the file full: wait...\n");
671
"InnoDB: Database physically writes the file"
657
674
ret = os_file_set_size(name, files[i],
658
675
srv_calc_low32(srv_log_file_size),
659
676
srv_calc_high32(srv_log_file_size));
661
drizzled::errmsg_printf(drizzled::error::ERROR,
662
"InnoDB: Error in creating %s: probably out of disk space",
679
"InnoDB: Error in creating %s:"
680
" probably out of disk space\n",
665
683
return(DB_ERROR);
737
755
char name[10000];
739
757
if (srv_n_data_files >= 1000) {
740
drizzled::errmsg_printf(drizzled::error::ERROR,
741
"InnoDB: can only have < 1000 data files you have defined %lu",
742
(ulong) srv_n_data_files);
758
fprintf(stderr, "InnoDB: can only have < 1000 data files\n"
759
"InnoDB: you have defined %lu\n",
760
(ulong) srv_n_data_files);
743
761
return(DB_ERROR);
797
815
srv_start_raw_disk_in_use = TRUE;
798
816
srv_created_new_raw = TRUE;
800
files[i] = os_file_create(innodb_file_data_key,
801
name, OS_FILE_OPEN_RAW,
818
files[i] = os_file_create(name, OS_FILE_OPEN_RAW,
803
820
OS_DATA_FILE, &ret);
805
drizzled::errmsg_printf(drizzled::error::ERROR,
806
"InnoDB: Error in opening %s", name);
823
"InnoDB: Error in opening %s\n", name);
808
825
return(DB_ERROR);
819
836
/* We open the data file */
821
838
if (one_created) {
822
drizzled::errmsg_printf(drizzled::error::ERROR,
823
"InnoDB: Error: data files can only be added at the end of a tablespace, but"
824
" data file %s existed beforehand.",
840
"InnoDB: Error: data files can only"
841
" be added at the end\n");
843
"InnoDB: of a tablespace, but"
844
" data file %s existed beforehand.\n",
826
846
return(DB_ERROR);
829
849
if (srv_data_file_is_raw_partition[i] == SRV_OLD_RAW) {
830
850
files[i] = os_file_create(
831
innodb_file_data_key,
832
851
name, OS_FILE_OPEN_RAW,
833
852
OS_FILE_NORMAL, OS_DATA_FILE, &ret);
834
853
} else if (i == 0) {
835
854
files[i] = os_file_create(
836
innodb_file_data_key,
837
855
name, OS_FILE_OPEN_RETRY,
838
856
OS_FILE_NORMAL, OS_DATA_FILE, &ret);
840
858
files[i] = os_file_create(
841
innodb_file_data_key,
842
859
name, OS_FILE_OPEN, OS_FILE_NORMAL,
843
860
OS_DATA_FILE, &ret);
847
drizzled::errmsg_printf(drizzled::error::ERROR,
848
"InnoDB: Error in opening %s", name);
865
"InnoDB: Error in opening %s\n", name);
849
866
os_file_get_last_error(TRUE);
851
868
return(DB_ERROR);
872
889
&& srv_last_file_size_max
873
890
< rounded_size_pages)) {
875
drizzled::errmsg_printf(drizzled::error::ERROR,
876
"InnoDB: Error: auto-extending data file %s is of a different size. "
877
"%lu pages (rounded down to MB) than specified in the .cnf file: "
878
"initial %lu pages, max %lu (relevant if non-zero) pages!",
880
(ulong) rounded_size_pages,
881
(ulong) srv_data_file_sizes[i],
883
srv_last_file_size_max);
893
"InnoDB: Error: auto-extending"
895
" of a different size\n"
896
"InnoDB: %lu pages (rounded"
897
" down to MB) than specified"
898
" in the .cnf file:\n"
899
"InnoDB: initial %lu pages,"
900
" max %lu (relevant if"
901
" non-zero) pages!\n",
903
(ulong) rounded_size_pages,
904
(ulong) srv_data_file_sizes[i],
906
srv_last_file_size_max);
885
908
return(DB_ERROR);
891
914
if (rounded_size_pages != srv_data_file_sizes[i]) {
893
drizzled::errmsg_printf(drizzled::error::ERROR,
894
"InnoDB: Error: data file %s is of a different size. "
895
"%lu pages (rounded down to MB). "
896
"Than specified in the .cnf file %lu pages!",
917
"InnoDB: Error: data file %s"
918
" is of a different size\n"
920
" (rounded down to MB)\n"
921
"InnoDB: than specified"
922
" in the .cnf file %lu pages!\n",
898
924
(ulong) rounded_size_pages,
899
925
(ulong) srv_data_file_sizes[i]);
915
941
one_created = TRUE;
918
drizzled::errmsg_printf(drizzled::error::INFO,
919
" InnoDB: Data file %s did not exist: new to be created",
944
ut_print_timestamp(stderr);
946
" InnoDB: Data file %s did not"
947
" exist: new to be created\n",
922
drizzled::errmsg_printf(drizzled::error::INFO,
923
"InnoDB: The first specified data file %s did not exist. A new database to be created!", name);
951
"InnoDB: The first specified"
952
" data file %s did not exist:\n"
953
"InnoDB: a new database"
954
" to be created!\n", name);
924
955
*create_new_db = TRUE;
927
drizzled::errmsg_printf(drizzled::error::INFO,
928
" InnoDB: Setting file %s size to %lu MB",
929
name, (ulong) (srv_data_file_sizes[i]
930
>> (20 - UNIV_PAGE_SIZE_SHIFT)));
958
ut_print_timestamp(stderr);
960
" InnoDB: Setting file %s size to %lu MB\n",
962
(ulong) (srv_data_file_sizes[i]
963
>> (20 - UNIV_PAGE_SIZE_SHIFT)));
932
drizzled::errmsg_printf(drizzled::error::INFO,
933
"InnoDB: Database physically writes the file full: wait...");
966
"InnoDB: Database physically writes the"
967
" file full: wait...\n");
935
969
ret = os_file_set_size(
938
972
srv_calc_high32(srv_data_file_sizes[i]));
941
drizzled::errmsg_printf(drizzled::error::ERROR,
942
"InnoDB: Error in creating %s: probably out of disk space", name);
976
"InnoDB: Error in creating %s:"
977
" probably out of disk space\n", name);
944
979
return(DB_ERROR);
1003
1043
on Mac OS X 10.3 or later. */
1004
1044
struct utsname utsname;
1005
1045
if (uname(&utsname)) {
1006
fputs(_("InnoDB: cannot determine Mac OS X version!\n"), stderr);
1046
fputs("InnoDB: cannot determine Mac OS X version!\n", stderr);
1008
1048
srv_have_fullfsync = strcmp(utsname.release, "7.") >= 0;
1010
1050
if (!srv_have_fullfsync) {
1011
fputs(_("InnoDB: On Mac OS X, fsync() may be"
1012
" broken on internal drives,\n"
1013
"InnoDB: making transactions unsafe!\n"), stderr);
1051
fputs("InnoDB: On Mac OS X, fsync() may be"
1052
" broken on internal drives,\n"
1053
"InnoDB: making transactions unsafe!\n", stderr);
1015
1055
# endif /* F_FULLFSYNC */
1016
1056
#endif /* HAVE_DARWIN_THREADS */
1018
1058
if (sizeof(ulint) != sizeof(void*)) {
1019
drizzled::errmsg_printf(drizzled::error::WARN,
1020
_("InnoDB: Error: size of InnoDB's ulint is %lu, but size of void* is %lu. "
1021
"The sizes should be the same so that on a 64-bit platform you can. Allocate more than 4 GB of memory."),
1060
"InnoDB: Error: size of InnoDB's ulint is %lu,"
1061
" but size of void* is %lu.\n"
1062
"InnoDB: The sizes should be the same"
1063
" so that on a 64-bit platform you can\n"
1064
"InnoDB: allocate more than 4 GB of memory.",
1022
1065
(ulong)sizeof(ulint), (ulong)sizeof(void*));
1028
1071
innodb_file_per_table) until this function has returned. */
1029
1072
srv_file_per_table = FALSE;
1030
1073
#ifdef UNIV_DEBUG
1031
drizzled::errmsg_printf(drizzled::error::INFO,
1032
_("InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!\n"));
1075
"InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!\n");
1035
1078
#ifdef UNIV_IBUF_DEBUG
1036
drizzled::errmsg_printf(drizzled::error::INFO,
1037
_("InnoDB: !!!!!!!! UNIV_IBUF_DEBUG switched on !!!!!!!!!\n"
1038
# ifdef UNIV_IBUF_COUNT_DEBUG
1039
"InnoDB: !!!!!!!! UNIV_IBUF_COUNT_DEBUG switched on !!!!!!!!!\n"
1040
"InnoDB: Crash recovery will fail with UNIV_IBUF_COUNT_DEBUG\n"
1080
"InnoDB: !!!!!!!! UNIV_IBUF_DEBUG switched on !!!!!!!!!\n"
1081
"InnoDB: Crash recovery will fail with UNIV_IBUF_DEBUG\n");
1045
1084
#ifdef UNIV_SYNC_DEBUG
1046
drizzled::errmsg_printf(drizzled::error::INFO,
1047
_("InnoDB: !!!!!!!! UNIV_SYNC_DEBUG switched on !!!!!!!!!\n"));
1086
"InnoDB: !!!!!!!! UNIV_SYNC_DEBUG switched on !!!!!!!!!\n");
1050
1089
#ifdef UNIV_SEARCH_DEBUG
1051
drizzled::errmsg_printf(drizzled::error::INFO,
1052
_("InnoDB: !!!!!!!! UNIV_SEARCH_DEBUG switched on !!!!!!!!!\n"));
1091
"InnoDB: !!!!!!!! UNIV_SEARCH_DEBUG switched on !!!!!!!!!\n");
1055
1094
#ifdef UNIV_LOG_LSN_DEBUG
1056
drizzled::errmsg_printf(drizzled::error::INFO,
1057
_("InnoDB: !!!!!!!! UNIV_LOG_LSN_DEBUG switched on !!!!!!!!!\n"));
1096
"InnoDB: !!!!!!!! UNIV_LOG_LSN_DEBUG switched on !!!!!!!!!\n");
1058
1097
#endif /* UNIV_LOG_LSN_DEBUG */
1059
1098
#ifdef UNIV_MEM_DEBUG
1060
drizzled::errmsg_printf(drizzled::error::INFO,
1061
_("InnoDB: !!!!!!!! UNIV_MEM_DEBUG switched on !!!!!!!!!\n"));
1100
"InnoDB: !!!!!!!! UNIV_MEM_DEBUG switched on !!!!!!!!!\n");
1064
if (UNIV_LIKELY(srv_use_sys_malloc))
1066
drizzled::errmsg_printf(drizzled::error::ERROR, _("InnoDB: The InnoDB memory heap is disabled\n"));
1103
if (UNIV_LIKELY(srv_use_sys_malloc)) {
1105
"InnoDB: The InnoDB memory heap is disabled\n");
1069
fputs("InnoDB: " IB_ATOMICS_STARTUP_MSG
1070
"\nInnoDB: Compressed tables use zlib " ZLIB_VERSION
1071
#ifdef UNIV_ZIP_DEBUG
1073
#endif /* UNIV_ZIP_DEBUG */
1074
#ifdef UNIV_ZIP_COPY
1075
" and extra copying"
1076
#endif /* UNIV_ZIP_COPY */
1108
fprintf(stderr, "InnoDB: %s\n", IB_ATOMICS_STARTUP_MSG);
1080
1110
/* Since InnoDB does not currently clean up all its internal data
1081
1111
structures in MySQL Embedded Server Library server_end(), we
1083
1113
second time during the process lifetime. */
1085
1115
if (srv_start_has_been_called) {
1086
drizzled::errmsg_printf(drizzled::error::ERROR,
1087
"InnoDB: Error: startup called second time during the process lifetime.\n");
1117
"InnoDB: Error: startup called second time"
1118
" during the process lifetime.\n"
1119
"InnoDB: In the MySQL Embedded Server Library"
1120
" you cannot call server_init()\n"
1121
"InnoDB: more than once during"
1122
" the process lifetime.\n");
1090
1125
srv_start_has_been_called = TRUE;
1107
1143
but when run in conjunction with InnoDB Hot Backup, it seemed
1108
1144
to corrupt the data files. */
1110
srv_use_native_aio = FALSE;
1115
/* On 2000 and XP, async IO is available. */
1116
srv_use_native_aio = TRUE;
1146
os_aio_use_native_aio = FALSE;
1120
/* Vista and later have both async IO and condition variables */
1121
srv_use_native_aio = TRUE;
1122
srv_use_native_conditions = TRUE;
1149
/* On Win 2000 and XP use async i/o */
1150
os_aio_use_native_aio = TRUE;
1126
#elif defined(LINUX_NATIVE_AIO)
1128
if (srv_use_native_aio) {
1129
drizzled::errmsg_printf(drizzled::error::INFO,
1130
_("InnoDB: Using Linux native AIO"));
1133
/* Currently native AIO is supported only on windows and linux
1134
and that also when the support is compiled in. In all other
1135
cases, we ignore the setting of innodb_use_native_aio. */
1136
srv_use_native_aio = FALSE;
1140
1154
if (srv_file_flush_method_str == NULL) {
1141
1155
/* These are the default options */
1162
1176
} else if (0 == ut_strcmp(srv_file_flush_method_str, "normal")) {
1163
1177
srv_win_file_flush_method = SRV_WIN_IO_NORMAL;
1164
srv_use_native_aio = FALSE;
1178
os_aio_use_native_aio = FALSE;
1166
1180
} else if (0 == ut_strcmp(srv_file_flush_method_str, "unbuffered")) {
1167
1181
srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
1168
srv_use_native_aio = FALSE;
1182
os_aio_use_native_aio = FALSE;
1170
1184
} else if (0 == ut_strcmp(srv_file_flush_method_str,
1171
1185
"async_unbuffered")) {
1172
1186
srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
1175
drizzled::errmsg_printf(drizzled::error::ERROR,
1176
"InnoDB: Unrecognized value %s for innodb_flush_method",
1177
srv_file_flush_method_str);
1190
"InnoDB: Unrecognized value %s for"
1191
" innodb_flush_method\n",
1192
srv_file_flush_method_str);
1178
1193
return(DB_ERROR);
1186
1201
maximum number of threads that can wait in the 'srv_conc array' for
1187
1202
their time to enter InnoDB. */
1204
#if defined(__NETWARE__)
1206
/* Create less event semaphores because Win 98/ME had
1207
difficulty creating 40000 event semaphores. Comment from
1208
Novell, Inc.: also, these just take a lot of memory on
1210
srv_max_n_threads = 1000;
1189
1212
if (srv_buf_pool_size >= 1000 * 1024 * 1024) {
1190
1213
/* If buffer pool is less than 1000 MB,
1191
assume fewer threads. Also use only one
1192
buffer pool instance */
1214
assume fewer threads. */
1193
1215
srv_max_n_threads = 50000;
1195
1217
} else if (srv_buf_pool_size >= 8 * 1024 * 1024) {
1197
srv_buf_pool_instances = 1;
1198
1219
srv_max_n_threads = 10000;
1200
srv_buf_pool_instances = 1;
1201
1221
srv_max_n_threads = 1000; /* saves several MB of memory,
1202
1222
especially in 64-bit
1206
1226
err = srv_boot();
1208
1228
if (err != DB_SUCCESS) {
1210
1230
return((int) err);
1213
mutex_create(srv_monitor_file_mutex_key,
1214
&srv_monitor_file_mutex, SYNC_NO_ORDER_CHECK);
1233
mutex_create(&srv_monitor_file_mutex, SYNC_NO_ORDER_CHECK);
1216
1235
if (srv_innodb_status) {
1217
srv_monitor_file_name = static_cast<char *>(mem_alloc(
1236
srv_monitor_file_name = mem_alloc(
1218
1237
strlen(fil_path_to_mysql_datadir)
1219
+ 20 + sizeof "/innodb_status."));
1238
+ 20 + sizeof "/innodb_status.");
1220
1239
sprintf(srv_monitor_file_name, "%s/innodb_status.%lu",
1221
1240
fil_path_to_mysql_datadir, os_proc_get_number());
1222
1241
srv_monitor_file = fopen(srv_monitor_file_name, "w+");
1223
1242
if (!srv_monitor_file) {
1224
drizzled::errmsg_printf(drizzled::error::ERROR,
1225
"InnoDB: unable to create %s: %s\n", srv_monitor_file_name, strerror(errno));
1243
fprintf(stderr, "InnoDB: unable to create %s: %s\n",
1244
srv_monitor_file_name, strerror(errno));
1226
1245
return(DB_ERROR);
1236
mutex_create(srv_dict_tmpfile_mutex_key,
1237
&srv_dict_tmpfile_mutex, SYNC_DICT_OPERATION);
1255
mutex_create(&srv_dict_tmpfile_mutex, SYNC_DICT_OPERATION);
1239
1257
srv_dict_tmpfile = os_file_create_tmpfile();
1240
1258
if (!srv_dict_tmpfile) {
1241
1259
return(DB_ERROR);
1244
mutex_create(srv_misc_tmpfile_mutex_key,
1245
&srv_misc_tmpfile_mutex, SYNC_ANY_LATCH);
1262
mutex_create(&srv_misc_tmpfile_mutex, SYNC_ANY_LATCH);
1247
1264
srv_misc_tmpfile = os_file_create_tmpfile();
1248
1265
if (!srv_misc_tmpfile) {
1275
1292
fil_init(srv_file_per_table ? 50000 : 5000,
1276
1293
srv_max_n_open_files);
1278
/* Print time to initialize the buffer pool */
1280
if (srv_buf_pool_size >= 1024 * 1024 * 1024) {
1281
drizzled::errmsg_printf(drizzled::error::INFO, "InnoDB: Initializing buffer pool, size = %.1fG",
1282
((double) srv_buf_pool_size) / (1024 * 1024 * 1024));
1284
drizzled::errmsg_printf(drizzled::error::INFO, "InnoDB: Initializing buffer pool, size = %.1fM",
1285
((double) srv_buf_pool_size) / (1024 * 1024));
1288
err = buf_pool_init(srv_buf_pool_size, srv_buf_pool_instances);
1290
drizzled::errmsg_printf(drizzled::error::INFO, "InnoDB: Completed initialization of buffer pool");
1292
if (err != DB_SUCCESS) {
1293
drizzled::errmsg_printf(drizzled::error::ERROR, "InnoDB: Fatal error: cannot allocate the memory for the buffer pool");
1295
ret = buf_pool_init();
1299
"InnoDB: Fatal error: cannot allocate the memory"
1300
" for the buffer pool\n");
1298
1305
#ifdef UNIV_DEBUG
1302
1309
if (srv_buf_pool_size <= 5 * 1024 * 1024) {
1304
drizzled::errmsg_printf(drizzled::error::WARN, "InnoDB: Warning: Small buffer pool size "
1305
"(%luM), the flst_validate() debug function "
1306
"can cause a deadlock if the buffer pool fills up.\n",
1307
srv_buf_pool_size / 1024 / 1024);
1311
fprintf(stderr, "InnoDB: Warning: Small buffer pool size "
1312
"(%luM), the flst_validate() debug function "
1313
"can cause a deadlock if the buffer pool fills up.\n",
1314
srv_buf_pool_size / 1024 / 1024);
1324
1331
#ifdef UNIV_LOG_ARCHIVE
1325
1332
if (0 != ut_strcmp(srv_log_group_home_dirs[0], srv_arch_dir)) {
1326
drizzled::errmsg_printf(drizzled::error::ERROR,
1327
"InnoDB: Error: you must set the log group home dir in my.cnf the same as log arch dir.");
1334
"InnoDB: Error: you must set the log group"
1335
" home dir in my.cnf the\n"
1336
"InnoDB: same as log arch dir.\n");
1329
1338
return(DB_ERROR);
1331
1340
#endif /* UNIV_LOG_ARCHIVE */
1333
1342
if (srv_n_log_files * srv_log_file_size >= 262144) {
1334
drizzled::errmsg_printf(drizzled::error::ERROR,
1335
"InnoDB: Error: combined size of log files must be < 4 GB");
1344
"InnoDB: Error: combined size of log files"
1345
" must be < 4 GB\n");
1337
1347
return(DB_ERROR);
1342
1352
for (i = 0; i < srv_n_data_files; i++) {
1343
1353
#ifndef __WIN__
1344
1354
if (sizeof(off_t) < 5 && srv_data_file_sizes[i] >= 262144) {
1345
drizzled::errmsg_printf(drizzled::error::ERROR,
1346
"InnoDB: Error: file size must be < 4 GB with this MySQL binary and operating system combination,"
1347
" in some OS's < 2 GB\n");
1356
"InnoDB: Error: file size must be < 4 GB"
1357
" with this MySQL binary\n"
1358
"InnoDB: and operating system combination,"
1359
" in some OS's < 2 GB\n");
1349
1361
return(DB_ERROR);
1365
1379
&min_flushed_lsn, &max_flushed_lsn,
1366
1380
&sum_of_new_sizes);
1367
1381
if (err != DB_SUCCESS) {
1368
drizzled::errmsg_printf(drizzled::error::ERROR,
1369
"InnoDB: Could not open or create data files.\n"
1370
"InnoDB: If you tried to add new data files, and it failed here,\n"
1371
"InnoDB: you should now edit innodb_data_file_path in my.cnf back\n"
1372
"InnoDB: to what it was, and remove the new ibdata files InnoDB created\n"
1373
"InnoDB: in this failed attempt. InnoDB only wrote those files full of\n"
1374
"InnoDB: zeros, but did not yet use them in any way. But be careful: do not\n"
1375
"InnoDB: remove old data files which contain your precious data!\n");
1383
"InnoDB: Could not open or create data files.\n"
1384
"InnoDB: If you tried to add new data files,"
1385
" and it failed here,\n"
1386
"InnoDB: you should now edit innodb_data_file_path"
1388
"InnoDB: to what it was, and remove the"
1389
" new ibdata files InnoDB created\n"
1390
"InnoDB: in this failed attempt. InnoDB only wrote"
1391
" those files full of\n"
1392
"InnoDB: zeros, but did not yet use them in any way."
1393
" But be careful: do not\n"
1394
"InnoDB: remove old data files"
1395
" which contain your precious data!\n");
1377
1397
return((int) err);
1398
1418
if ((log_opened && create_new_db)
1399
1419
|| (log_opened && log_created)) {
1400
drizzled::errmsg_printf(drizzled::error::ERROR,
1401
"InnoDB: Error: all log files must be created at the same time.\n"
1402
"InnoDB: All log files must be created also in database creation.\n"
1403
"InnoDB: If you want bigger or smaller log files, shut down the\n"
1404
"InnoDB: database and make sure there were no errors in shutdown.\n"
1405
"InnoDB: Then delete the existing log files. Edit the .cnf file\n"
1421
"InnoDB: Error: all log files must be"
1422
" created at the same time.\n"
1423
"InnoDB: All log files must be"
1424
" created also in database creation.\n"
1425
"InnoDB: If you want bigger or smaller"
1426
" log files, shut down the\n"
1427
"InnoDB: database and make sure there"
1428
" were no errors in shutdown.\n"
1429
"InnoDB: Then delete the existing log files."
1430
" Edit the .cnf file\n"
1406
1431
"InnoDB: and start the database again.\n");
1408
1433
return(DB_ERROR);
1424
1449
|| max_arch_log_no != min_arch_log_no
1425
1450
#endif /* UNIV_LOG_ARCHIVE */
1427
drizzled::errmsg_printf(drizzled::error::ERROR,
1428
"InnoDB: Cannot initialize created log files because\n"
1429
"InnoDB: data files were not in sync with each other\n"
1453
"InnoDB: Cannot initialize created"
1454
" log files because\n"
1455
"InnoDB: data files were not in sync"
1456
" with each other\n"
1430
1457
"InnoDB: or the data files are corrupt.\n");
1432
1459
return(DB_ERROR);
1435
1462
if (max_flushed_lsn < (ib_uint64_t) 1000) {
1436
drizzled::errmsg_printf(drizzled::error::ERROR,
1437
"InnoDB: Cannot initialize created log files because\n"
1438
"InnoDB: data files are corrupt, or new data files were\n"
1439
"InnoDB: created when the database was started previous\n"
1440
"InnoDB: time but the database was not shut down\n"
1441
"InnoDB: normally after that.\n");
1464
"InnoDB: Cannot initialize created"
1465
" log files because\n"
1466
"InnoDB: data files are corrupt,"
1467
" or new data files were\n"
1468
"InnoDB: created when the database"
1469
" was started previous\n"
1470
"InnoDB: time but the database"
1471
" was not shut down\n"
1472
"InnoDB: normally after that.\n");
1443
1474
return(DB_ERROR);
1461
1492
if (create_new_db) {
1462
1493
mtr_start(&mtr);
1464
1494
fsp_header_init(0, sum_of_new_sizes, &mtr);
1466
1496
mtr_commit(&mtr);
1468
/* To maintain backward compatibility we create only
1469
the first rollback segment before the double write buffer.
1470
All the remaining rollback segments will be created later,
1471
after the double write buffer has been created. */
1472
1498
trx_sys_create();
1476
1500
srv_startup_is_before_trx_rollback_phase = FALSE;
1478
1502
#ifdef UNIV_LOG_ARCHIVE
1479
1503
} else if (srv_archive_recovery) {
1480
drizzled::errmsg_printf(drizzled::error::INFO,
1481
"InnoDB: Starting archive recovery from a backup...");
1505
"InnoDB: Starting archive"
1506
" recovery from a backup...\n");
1482
1507
err = recv_recovery_from_archive_start(
1483
1508
min_flushed_lsn, srv_archive_recovery_limit_lsn,
1484
1509
min_arch_log_no);
1551
1574
trx_sys_init_at_db_start();
1553
/* Initialize the fsp free limit global variable in the log
1555
fsp_header_get_free_limit();
1557
/* recv_recovery_from_checkpoint_finish needs trx lists which
1558
are initialized in trx_sys_init_at_db_start(). */
1560
recv_recovery_from_checkpoint_finish();
1561
1576
if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
1562
1577
/* The following call is necessary for the insert
1563
1578
buffer to work with multiple tablespaces. We must
1573
1588
every table in the InnoDB data dictionary that has
1576
We also determine the maximum tablespace id used. */
1591
We also determine the maximum tablespace id used.
1593
TODO: We may have incomplete transactions in the
1594
data dictionary tables. Does that harm the scanning of
1595
the data dictionary below? */
1578
1597
dict_check_tablespaces_and_store_max_id(
1579
1598
recv_needed_recovery);
1582
1601
srv_startup_is_before_trx_rollback_phase = FALSE;
1583
recv_recovery_rollback_active();
1603
/* Initialize the fsp free limit global variable in the log
1605
fsp_header_get_free_limit();
1607
/* recv_recovery_from_checkpoint_finish needs trx lists which
1608
are initialized in trx_sys_init_at_db_start(). */
1610
recv_recovery_from_checkpoint_finish();
1585
1612
/* It is possible that file_format tag has never
1586
1613
been set. In this case we initialize it to minimum
1629
1656
/* fprintf(stderr, "Max allowed record size %lu\n",
1630
1657
page_get_free_space_of_empty() / 2); */
1632
if (trx_doublewrite == NULL) {
1633
/* Create the doublewrite buffer to a new tablespace */
1635
trx_sys_create_doublewrite_buf();
1638
/* Here the double write buffer has already been created and so
1639
any new rollback segments will be allocated after the double
1640
write buffer. The default segment should already exist.
1641
We create the new segments only if it's a new database or
1642
the database was shutdown cleanly. */
1644
/* Note: When creating the extra rollback segments during an upgrade
1645
we violate the latching order, even if the change buffer is empty.
1646
We make an exception in sync0sync.c and check srv_is_being_started
1647
for that violation. It cannot create a deadlock because we are still
1648
running in single threaded mode essentially. Only the IO threads
1649
should be running at this stage. */
1651
trx_sys_create_rsegs(TRX_SYS_N_RSEGS - 1);
1653
/* Create the thread which watches the timeouts for lock waits */
1654
os_thread_create(&srv_lock_timeout_thread, NULL,
1659
/* Create the thread which watches the timeouts for lock waits
1660
and prints InnoDB monitor info */
1662
os_thread_create(&srv_lock_timeout_and_monitor_thread, NULL,
1655
1663
thread_ids + 2 + SRV_MAX_N_IO_THREADS);
1657
1665
/* Create the thread which warns of long semaphore waits */
1658
1666
os_thread_create(&srv_error_monitor_thread, NULL,
1659
1667
thread_ids + 3 + SRV_MAX_N_IO_THREADS);
1661
/* Create the thread which prints InnoDB monitor info */
1662
os_thread_create(&srv_monitor_thread, NULL,
1663
thread_ids + 4 + SRV_MAX_N_IO_THREADS);
1665
1668
srv_is_being_started = FALSE;
1670
if (trx_doublewrite == NULL) {
1671
/* Create the doublewrite buffer to a new tablespace */
1673
trx_sys_create_doublewrite_buf();
1667
1676
err = dict_create_or_check_foreign_constraint_tables();
1669
1678
if (err != DB_SUCCESS) {
1676
1685
os_thread_create(&srv_master_thread, NULL, thread_ids
1677
1686
+ (1 + SRV_MAX_N_IO_THREADS));
1679
/* Currently we allow only a single purge thread. */
1680
ut_a(srv_n_purge_threads == 0 || srv_n_purge_threads == 1);
1682
/* If the user has requested a separate purge thread then
1683
start the purge thread. */
1684
if (srv_n_purge_threads == 1) {
1685
os_thread_create(&srv_purge_thread, NULL, NULL);
1688
1687
#ifdef UNIV_DEBUG
1689
1688
/* buf_debug_prints = TRUE; */
1690
1689
#endif /* UNIV_DEBUG */
1699
1698
if (!srv_auto_extend_last_data_file
1700
1699
&& sum_of_data_file_sizes != tablespace_size_in_header) {
1702
drizzled::errmsg_printf(drizzled::error::ERROR,
1703
"InnoDB: Error: tablespace size stored in header is %lu pages, but the sum of data file sizes is %lu pages.",
1704
(ulong) tablespace_size_in_header,
1705
(ulong) sum_of_data_file_sizes);
1702
"InnoDB: Error: tablespace size"
1703
" stored in header is %lu pages, but\n"
1704
"InnoDB: the sum of data file sizes is %lu pages\n",
1705
(ulong) tablespace_size_in_header,
1706
(ulong) sum_of_data_file_sizes);
1707
1708
if (srv_force_recovery == 0
1708
1709
&& sum_of_data_file_sizes < tablespace_size_in_header) {
1709
1710
/* This is a fatal error, the tail of a tablespace is
1712
drizzled::errmsg_printf(drizzled::error::ERROR,
1713
"InnoDB: Cannot start InnoDB. The tail of the system tablespace is "
1714
"missing. Have you edited innodb_data_file_path in my.cnf in an "
1715
"inappropriate way, removing ibdata files from there? "
1716
"You can set innodb_force_recovery=1 in my.cnf to force "
1717
"a startup if you are trying to recover a badly corrupt database.");
1714
"InnoDB: Cannot start InnoDB."
1715
" The tail of the system tablespace is\n"
1716
"InnoDB: missing. Have you edited"
1717
" innodb_data_file_path in my.cnf in an\n"
1718
"InnoDB: inappropriate way, removing"
1719
" ibdata files from there?\n"
1720
"InnoDB: You can set innodb_force_recovery=1"
1721
" in my.cnf to force\n"
1722
"InnoDB: a startup if you are trying"
1723
" to recover a badly corrupt database.\n");
1719
1725
return(DB_ERROR);
1723
1729
if (srv_auto_extend_last_data_file
1724
1730
&& sum_of_data_file_sizes < tablespace_size_in_header) {
1726
drizzled::errmsg_printf(drizzled::error::ERROR,
1727
"InnoDB: Error: tablespace size stored in header is %lu pages, but the sum of data file sizes"
1728
" is only %lu pages\n",
1729
(ulong) tablespace_size_in_header,
1730
(ulong) sum_of_data_file_sizes);
1733
"InnoDB: Error: tablespace size stored in header"
1734
" is %lu pages, but\n"
1735
"InnoDB: the sum of data file sizes"
1736
" is only %lu pages\n",
1737
(ulong) tablespace_size_in_header,
1738
(ulong) sum_of_data_file_sizes);
1732
1740
if (srv_force_recovery == 0) {
1734
drizzled::errmsg_printf(drizzled::error::ERROR,
1735
"InnoDB: Cannot start InnoDB. The tail of the system tablespace is "
1736
"missing. Have you edited innodb_data_file_path in my.cnf in an "
1737
"inappropriate way, removing ibdata files from there? "
1738
"You can set innodb_force_recovery=1 in my.cnf to force "
1739
"a startup if you are trying to recover a badly corrupt database.\n");
1743
"InnoDB: Cannot start InnoDB. The tail of"
1744
" the system tablespace is\n"
1745
"InnoDB: missing. Have you edited"
1746
" innodb_data_file_path in my.cnf in an\n"
1747
"InnoDB: inappropriate way, removing"
1748
" ibdata files from there?\n"
1749
"InnoDB: You can set innodb_force_recovery=1"
1750
" in my.cnf to force\n"
1751
"InnoDB: a startup if you are trying to"
1752
" recover a badly corrupt database.\n");
1741
1754
return(DB_ERROR);
1746
1759
os_fast_mutex_init(&srv_os_test_mutex);
1748
1761
if (0 != os_fast_mutex_trylock(&srv_os_test_mutex)) {
1749
drizzled::errmsg_printf(drizzled::error::ERROR,
1750
"InnoDB: Error: pthread_mutex_trylock returns an unexpected value on success! Cannot continue.\n");
1763
"InnoDB: Error: pthread_mutex_trylock returns"
1764
" an unexpected value on\n"
1765
"InnoDB: success! Cannot continue.\n");
1760
1775
os_fast_mutex_free(&srv_os_test_mutex);
1762
1777
if (srv_print_verbose_log) {
1763
drizzled::errmsg_printf(drizzled::error::ERROR,
1764
"InnoDB %s started; log sequence number %"PRIu64"\n",
1765
INNODB_VERSION_STR, srv_start_lsn);
1778
ut_print_timestamp(stderr);
1780
" InnoDB Plugin %s started; "
1781
"log sequence number %"PRIu64"\n",
1782
INNODB_VERSION_STR, srv_start_lsn);
1768
1785
if (srv_force_recovery > 0) {
1769
drizzled::errmsg_printf(drizzled::error::ERROR,
1770
"InnoDB: !!! innodb_force_recovery is set to %lu !!!\n",
1771
(ulong) srv_force_recovery);
1787
"InnoDB: !!! innodb_force_recovery"
1788
" is set to %lu !!!\n",
1789
(ulong) srv_force_recovery);
1774
1794
if (trx_doublewrite_must_reset_space_ids) {
1775
1795
/* Actually, we did not change the undo log format between
1776
1796
4.0 and 4.1.1, and we would not need to run purge to
1785
1805
4.1.1. It is essential that the insert buffer is emptied
1788
drizzled::errmsg_printf(drizzled::error::INFO,
1789
"InnoDB: You are upgrading to an InnoDB version which allows multiple. "
1790
"tablespaces. Wait that purge and insert buffer merge run to completion...");
1809
"InnoDB: You are upgrading to an"
1810
" InnoDB version which allows multiple\n"
1811
"InnoDB: tablespaces. Wait that purge"
1812
" and insert buffer merge run to\n"
1813
"InnoDB: completion...\n");
1792
1815
os_thread_sleep(1000000);
1802
drizzled::errmsg_printf(drizzled::error::INFO,
1803
"InnoDB: Full purge and insert buffer merge completed.");
1826
"InnoDB: Full purge and insert buffer merge"
1805
1829
trx_sys_mark_upgraded_to_multiple_tablespaces();
1807
drizzled::errmsg_printf(drizzled::error::INFO,
1808
"InnoDB: You have now successfully upgraded"
1809
" to the multiple tablespaces\n"
1810
"InnoDB: format. You should NOT DOWNGRADE"
1811
" to an earlier version of\n"
1812
"InnoDB: InnoDB! But if you absolutely need to"
1814
"InnoDB: " REFMAN "multiple-tablespaces.html\n"
1815
"InnoDB: for instructions.\n");
1832
"InnoDB: You have now successfully upgraded"
1833
" to the multiple tablespaces\n"
1834
"InnoDB: format. You should NOT DOWNGRADE"
1835
" to an earlier version of\n"
1836
"InnoDB: InnoDB! But if you absolutely need to"
1838
"InnoDB: " REFMAN "multiple-tablespaces.html\n"
1839
"InnoDB: for instructions.\n");
1818
1842
if (srv_force_recovery == 0) {
1840
1864
/*=============================*/
1868
extern ibool panic_shutdown;
1843
1870
if (!srv_was_started) {
1844
1871
if (srv_is_being_started) {
1845
drizzled::errmsg_printf(drizzled::error::ERROR,
1846
"InnoDB: Warning: shutting down a not properly started or created database!");
1872
ut_print_timestamp(stderr);
1874
" InnoDB: Warning: shutting down"
1875
" a not properly started\n"
1876
"InnoDB: or created database!\n");
1849
1879
return(DB_SUCCESS);
1858
1888
if (srv_fast_shutdown == 2) {
1859
drizzled::errmsg_printf(drizzled::error::INFO,
1860
"InnoDB: MySQL has requested a very fast shutdown without flushing "
1861
"the InnoDB buffer pool to data files. At the next mysqld startup "
1862
"InnoDB will do a crash recovery!");
1889
ut_print_timestamp(stderr);
1891
" InnoDB: MySQL has requested a very fast shutdown"
1892
" without flushing "
1893
"the InnoDB buffer pool to data files."
1894
" At the next mysqld startup "
1895
"InnoDB will do a crash recovery!\n");
1865
logs_empty_and_mark_files_at_shutdown();
1899
if (!panic_shutdown)
1901
logs_empty_and_mark_files_at_shutdown();
1867
1903
if (srv_conc_n_threads != 0) {
1868
drizzled::errmsg_printf(drizzled::error::WARN,
1869
"InnoDB: Warning: query counter shows %ld queries still InnoDB: inside InnoDB at shutdown.",
1870
srv_conc_n_threads);
1905
"InnoDB: Warning: query counter shows %ld queries"
1907
"InnoDB: inside InnoDB at shutdown\n",
1908
srv_conc_n_threads);
1873
1911
/* 2. Make all threads created by InnoDB to exit */
1932
1967
if (i == 1000) {
1933
drizzled::errmsg_printf(drizzled::error::WARN,
1934
"InnoDB: Warning: %lu threads created by InnoDB had not exited at shutdown!",
1969
"InnoDB: Warning: %lu threads created by InnoDB"
1970
" had not exited at shutdown!\n",
1935
1971
(ulong) os_thread_count);
1986
2022
pars_lexer_close();
1987
2023
log_mem_free();
1988
buf_pool_free(srv_buf_pool_instances);
1991
/* ut_free_all_mem() frees all allocated memory not freed yet
1992
in shutdown, and it will also free the ut_list_mutex, so it
1993
should be the last one for all operation */
1996
2028
if (os_thread_count != 0
1997
2029
|| os_event_count != 0
1998
2030
|| os_mutex_count != 0
1999
2031
|| os_fast_mutex_count != 0) {
2000
drizzled::errmsg_printf(drizzled::error::WARN,
2001
"InnoDB: Warning: some resources were not cleaned up in shutdown:\n"
2002
"InnoDB: threads %lu, events %lu, os_mutexes %lu, os_fast_mutexes %lu\n",
2003
(ulong) os_thread_count, (ulong) os_event_count,
2004
(ulong) os_mutex_count, (ulong) os_fast_mutex_count);
2033
"InnoDB: Warning: some resources were not"
2034
" cleaned up in shutdown:\n"
2035
"InnoDB: threads %lu, events %lu,"
2036
" os_mutexes %lu, os_fast_mutexes %lu\n",
2037
(ulong) os_thread_count, (ulong) os_event_count,
2038
(ulong) os_mutex_count, (ulong) os_fast_mutex_count);
2007
2041
if (dict_foreign_err_file) {
2014
2048
if (srv_print_verbose_log) {
2015
drizzled::errmsg_printf(drizzled::error::INFO,
2016
"InnoDB: Shutdown completed log sequence number %"PRIu64,
2049
ut_print_timestamp(stderr);
2051
" InnoDB: Shutdown completed;"
2052
" log sequence number %"PRIu64"\n",
2020
2056
srv_was_started = FALSE;