~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/srv/srv0start.cc

  • Committer: Olaf van der Spek
  • Date: 2011-03-29 12:04:36 UTC
  • mto: (2257.1.1 build) (2276.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: olafvdspek@gmail.com-20110329120436-vozkuer8vqgh027p
Always call assert()

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
#include <errno.h>
93
93
#include <unistd.h>
94
94
 
 
95
#include <drizzled/gettext.h> 
 
96
#include <drizzled/errmsg_print.h>
 
97
 
95
98
/** Log sequence number immediately after startup */
96
99
UNIV_INTERN ib_uint64_t srv_start_lsn;
97
100
/** Log sequence number at shutdown */
123
126
/** Files comprising the system tablespace */
124
127
static os_file_t        files[1000];
125
128
 
126
 
/** Mutex protecting the ios count */
127
 
static mutex_t          ios_mutex;
128
 
/** Count of I/O operations in io_handler_thread() */
129
 
static ulint            ios;
130
 
 
131
129
/** io_handler_thread parameters for thread identification */
132
130
static ulint            n[SRV_MAX_N_IO_THREADS + 6];
133
131
/** io_handler_thread identifiers */
154
152
UNIV_INTERN mysql_pfs_key_t     srv_master_thread_key;
155
153
#endif /* UNIV_PFS_THREAD */
156
154
 
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 */
161
 
 
162
155
/*********************************************************************//**
163
156
Convert a numeric string that optionally ends in G or M, to a number
164
157
containing megabytes.
289
282
                return(FALSE);
290
283
        }
291
284
 
292
 
        srv_data_file_names = malloc(i * sizeof *srv_data_file_names);
293
 
        srv_data_file_sizes = malloc(i * sizeof *srv_data_file_sizes);
294
 
        srv_data_file_is_raw_partition = malloc(
295
 
                i * sizeof *srv_data_file_is_raw_partition);
 
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
289
 
297
290
        srv_n_data_files = i;
298
291
 
422
415
                return(FALSE);
423
416
        }
424
417
 
425
 
        srv_log_group_home_dirs = malloc(i * sizeof *srv_log_group_home_dirs);
 
418
        srv_log_group_home_dirs = static_cast<char **>(malloc(i * sizeof *srv_log_group_home_dirs));
426
419
 
427
420
        /* Then store the actual values to our array */
428
421
 
471
464
/********************************************************************//**
472
465
I/o-handler thread function.
473
466
@return OS_THREAD_DUMMY_RETURN */
474
 
static
 
467
extern "C"
 
468
os_thread_ret_t
 
469
io_handler_thread(void* arg);
 
470
 
 
471
extern "C"
475
472
os_thread_ret_t
476
473
io_handler_thread(
477
474
/*==============*/
493
490
 
494
491
        while (srv_shutdown_state != SRV_SHUTDOWN_EXIT_THREADS) {
495
492
                fil_aio_wait(segment);
496
 
 
497
 
                mutex_enter(&ios_mutex);
498
 
                ios++;
499
 
                mutex_exit(&ios_mutex);
500
493
        }
501
494
 
502
 
        thr_local_free(os_thread_get_curr_id());
503
 
 
504
495
        /* We count the number of threads in os_thread_exit(). A created
505
496
        thread should always use that to exit and not use return() to exit.
506
497
        The thread actually never comes here because it is exited in an
521
512
void
522
513
srv_normalize_path_for_win(
523
514
/*=======================*/
524
 
        char*   str __attribute__((unused)))    /*!< in/out: null-terminated
 
515
        char*   /*str __attribute__((unused))*/)        /*!< in/out: null-terminated
525
516
                                                character string */
526
517
{
527
518
#ifdef __WIN__
613
604
                    && os_file_get_last_error(FALSE) != 100
614
605
#endif
615
606
                    ) {
616
 
                        fprintf(stderr,
617
 
                                "InnoDB: Error in creating"
618
 
                                " or opening %s\n", name);
 
607
                  drizzled::errmsg_printf(drizzled::error::ERROR,
 
608
                                          "InnoDB: Error in creating or opening %s", name);
619
609
 
620
 
                        return(DB_ERROR);
 
610
                  return(DB_ERROR);
621
611
                }
622
612
 
623
613
                files[i] = os_file_create(innodb_file_log_key, name,
624
614
                                          OS_FILE_OPEN, OS_FILE_AIO,
625
615
                                          OS_LOG_FILE, &ret);
626
616
                if (!ret) {
627
 
                        fprintf(stderr,
628
 
                                "InnoDB: Error in opening %s\n", name);
 
617
                  drizzled::errmsg_printf(drizzled::error::ERROR,
 
618
                                          "InnoDB: Error in opening %s.", name);
629
619
 
630
620
                        return(DB_ERROR);
631
621
                }
636
626
                if (size != srv_calc_low32(srv_log_file_size)
637
627
                    || size_high != srv_calc_high32(srv_log_file_size)) {
638
628
 
639
 
                        fprintf(stderr,
640
 
                                "InnoDB: Error: log file %s is"
641
 
                                " of different size %lu %lu bytes\n"
642
 
                                "InnoDB: than specified in the .cnf"
643
 
                                " file %lu %lu bytes!\n",
644
 
                                name, (ulong) size_high, (ulong) size,
645
 
                                (ulong) srv_calc_high32(srv_log_file_size),
646
 
                                (ulong) srv_calc_low32(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));
647
635
 
648
636
                        return(DB_ERROR);
649
637
                }
650
638
        } else {
651
639
                *log_file_created = TRUE;
652
640
 
653
 
                ut_print_timestamp(stderr);
654
 
 
655
 
                fprintf(stderr,
656
 
                        "  InnoDB: Log file %s did not exist:"
657
 
                        " new to be created\n",
658
 
                        name);
 
641
                drizzled::errmsg_printf(drizzled::error::INFO,
 
642
                                        "InnoDB: Log file %s did not exist: new to be created",
 
643
                                        name);
659
644
                if (log_file_has_been_opened) {
660
645
 
661
646
                        return(DB_ERROR);
662
647
                }
663
648
 
664
 
                fprintf(stderr, "InnoDB: Setting log file %s size to %lu MB\n",
665
 
                        name, (ulong) srv_log_file_size
666
 
                        >> (20 - UNIV_PAGE_SIZE_SHIFT));
 
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));
667
653
 
668
 
                fprintf(stderr,
669
 
                        "InnoDB: Database physically writes the file"
670
 
                        " full: wait...\n");
 
654
                drizzled::errmsg_printf(drizzled::error::INFO,
 
655
                                        "InnoDB: Database physically writes the file full: wait...\n");
671
656
 
672
657
                ret = os_file_set_size(name, files[i],
673
658
                                       srv_calc_low32(srv_log_file_size),
674
659
                                       srv_calc_high32(srv_log_file_size));
675
660
                if (!ret) {
676
 
                        fprintf(stderr,
677
 
                                "InnoDB: Error in creating %s:"
678
 
                                " probably out of disk space\n",
679
 
                                name);
 
661
                  drizzled::errmsg_printf(drizzled::error::ERROR,
 
662
                                          "InnoDB: Error in creating %s: probably out of disk space",
 
663
                                          name);
680
664
 
681
665
                        return(DB_ERROR);
682
666
                }
753
737
        char    name[10000];
754
738
 
755
739
        if (srv_n_data_files >= 1000) {
756
 
                fprintf(stderr, "InnoDB: can only have < 1000 data files\n"
757
 
                        "InnoDB: you have defined %lu\n",
758
 
                        (ulong) srv_n_data_files);
 
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);
759
743
                return(DB_ERROR);
760
744
        }
761
745
 
800
784
                            && os_file_get_last_error(FALSE) != 100
801
785
#endif
802
786
                            ) {
803
 
                                fprintf(stderr,
804
 
                                        "InnoDB: Error in creating"
805
 
                                        " or opening %s\n",
806
 
                                        name);
 
787
                          drizzled::errmsg_printf(drizzled::error::ERROR,
 
788
                                                  "InnoDB: Error in creating or opening %s",
 
789
                                                  name);
807
790
 
808
791
                                return(DB_ERROR);
809
792
                        }
819
802
                                                  OS_FILE_NORMAL,
820
803
                                                  OS_DATA_FILE, &ret);
821
804
                        if (!ret) {
822
 
                                fprintf(stderr,
823
 
                                        "InnoDB: Error in opening %s\n", name);
 
805
                          drizzled::errmsg_printf(drizzled::error::ERROR,
 
806
                                                  "InnoDB: Error in opening %s", name);
824
807
 
825
808
                                return(DB_ERROR);
826
809
                        }
836
819
                        /* We open the data file */
837
820
 
838
821
                        if (one_created) {
839
 
                                fprintf(stderr,
840
 
                                        "InnoDB: Error: data files can only"
841
 
                                        " be added at the end\n");
842
 
                                fprintf(stderr,
843
 
                                        "InnoDB: of a tablespace, but"
844
 
                                        " data file %s existed beforehand.\n",
845
 
                                        name);
 
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.",
 
825
                                        name);
846
826
                                return(DB_ERROR);
847
827
                        }
848
828
 
864
844
                        }
865
845
 
866
846
                        if (!ret) {
867
 
                                fprintf(stderr,
868
 
                                        "InnoDB: Error in opening %s\n", name);
 
847
                          drizzled::errmsg_printf(drizzled::error::ERROR,
 
848
                                                  "InnoDB: Error in opening %s", name);
869
849
                                os_file_get_last_error(TRUE);
870
850
 
871
851
                                return(DB_ERROR);
892
872
                                        && srv_last_file_size_max
893
873
                                        < rounded_size_pages)) {
894
874
 
895
 
                                        fprintf(stderr,
896
 
                                                "InnoDB: Error: auto-extending"
897
 
                                                " data file %s is"
898
 
                                                " of a different size\n"
899
 
                                                "InnoDB: %lu pages (rounded"
900
 
                                                " down to MB) than specified"
901
 
                                                " in the .cnf file:\n"
902
 
                                                "InnoDB: initial %lu pages,"
903
 
                                                " max %lu (relevant if"
904
 
                                                " non-zero) pages!\n",
905
 
                                                name,
906
 
                                                (ulong) rounded_size_pages,
907
 
                                                (ulong) srv_data_file_sizes[i],
908
 
                                                (ulong)
909
 
                                                srv_last_file_size_max);
 
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!",
 
879
                                                          name,
 
880
                                                          (ulong) rounded_size_pages,
 
881
                                                          (ulong) srv_data_file_sizes[i],
 
882
                                                          (ulong)
 
883
                                                          srv_last_file_size_max);
910
884
 
911
885
                                        return(DB_ERROR);
912
886
                                }
916
890
 
917
891
                        if (rounded_size_pages != srv_data_file_sizes[i]) {
918
892
 
919
 
                                fprintf(stderr,
920
 
                                        "InnoDB: Error: data file %s"
921
 
                                        " is of a different size\n"
922
 
                                        "InnoDB: %lu pages"
923
 
                                        " (rounded down to MB)\n"
924
 
                                        "InnoDB: than specified"
925
 
                                        " in the .cnf file %lu pages!\n",
 
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!",
926
897
                                        name,
927
898
                                        (ulong) rounded_size_pages,
928
899
                                        (ulong) srv_data_file_sizes[i]);
944
915
                        one_created = TRUE;
945
916
 
946
917
                        if (i > 0) {
947
 
                                ut_print_timestamp(stderr);
948
 
                                fprintf(stderr,
949
 
                                        "  InnoDB: Data file %s did not"
950
 
                                        " exist: new to be created\n",
 
918
                                drizzled::errmsg_printf(drizzled::error::INFO,
 
919
                                        "  InnoDB: Data file %s did not exist: new to be created",
951
920
                                        name);
952
921
                        } else {
953
 
                                fprintf(stderr,
954
 
                                        "InnoDB: The first specified"
955
 
                                        " data file %s did not exist:\n"
956
 
                                        "InnoDB: a new database"
957
 
                                        " to be created!\n", name);
 
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);
958
924
                                *create_new_db = TRUE;
959
925
                        }
960
926
 
961
 
                        ut_print_timestamp(stderr);
962
 
                        fprintf(stderr,
963
 
                                "  InnoDB: Setting file %s size to %lu MB\n",
964
 
                                name,
965
 
                                (ulong) (srv_data_file_sizes[i]
966
 
                                         >> (20 - UNIV_PAGE_SIZE_SHIFT)));
 
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)));
967
931
 
968
 
                        fprintf(stderr,
969
 
                                "InnoDB: Database physically writes the"
970
 
                                " file full: wait...\n");
 
932
                        drizzled::errmsg_printf(drizzled::error::INFO,
 
933
                                "InnoDB: Database physically writes the file full: wait...");
971
934
 
972
935
                        ret = os_file_set_size(
973
936
                                name, files[i],
975
938
                                srv_calc_high32(srv_data_file_sizes[i]));
976
939
 
977
940
                        if (!ret) {
978
 
                                fprintf(stderr,
979
 
                                        "InnoDB: Error in creating %s:"
980
 
                                        " probably out of disk space\n", name);
 
941
                          drizzled::errmsg_printf(drizzled::error::ERROR,
 
942
                                                  "InnoDB: Error in creating %s: probably out of disk space", name);
981
943
 
982
944
                                return(DB_ERROR);
983
945
                        }
999
961
                                srv_data_file_is_raw_partition[i] != 0);
1000
962
        }
1001
963
 
1002
 
        ios = 0;
1003
 
 
1004
 
        mutex_create(ios_mutex_key, &ios_mutex, SYNC_NO_ORDER_CHECK);
1005
 
 
1006
964
        return(DB_SUCCESS);
1007
965
}
1008
966
 
1045
1003
        on Mac OS X 10.3 or later. */
1046
1004
        struct utsname utsname;
1047
1005
        if (uname(&utsname)) {
1048
 
                fputs("InnoDB: cannot determine Mac OS X version!\n", stderr);
 
1006
                fputs(_("InnoDB: cannot determine Mac OS X version!\n"), stderr);
1049
1007
        } else {
1050
1008
                srv_have_fullfsync = strcmp(utsname.release, "7.") >= 0;
1051
1009
        }
1052
1010
        if (!srv_have_fullfsync) {
1053
 
                fputs("InnoDB: On Mac OS X, fsync() may be"
1054
 
                      " broken on internal drives,\n"
1055
 
                      "InnoDB: making transactions unsafe!\n", stderr);
 
1011
                fputs(_("InnoDB: On Mac OS X, fsync() may be"
 
1012
                        " broken on internal drives,\n"
 
1013
                        "InnoDB: making transactions unsafe!\n"), stderr);
1056
1014
        }
1057
1015
# endif /* F_FULLFSYNC */
1058
1016
#endif /* HAVE_DARWIN_THREADS */
1059
1017
 
1060
1018
        if (sizeof(ulint) != sizeof(void*)) {
1061
 
                fprintf(stderr,
1062
 
                        "InnoDB: Error: size of InnoDB's ulint is %lu,"
1063
 
                        " but size of void* is %lu.\n"
1064
 
                        "InnoDB: The sizes should be the same"
1065
 
                        " so that on a 64-bit platform you can\n"
1066
 
                        "InnoDB: allocate more than 4 GB of memory.",
 
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."),
1067
1022
                        (ulong)sizeof(ulint), (ulong)sizeof(void*));
1068
1023
        }
1069
1024
 
1073
1028
        innodb_file_per_table) until this function has returned. */
1074
1029
        srv_file_per_table = FALSE;
1075
1030
#ifdef UNIV_DEBUG
1076
 
        fprintf(stderr,
1077
 
                "InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!\n");
 
1031
        drizzled::errmsg_printf(drizzled::error::INFO,
 
1032
                                _("InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!\n"));
1078
1033
#endif
1079
1034
 
1080
1035
#ifdef UNIV_IBUF_DEBUG
1081
 
        fprintf(stderr,
1082
 
                "InnoDB: !!!!!!!! UNIV_IBUF_DEBUG switched on !!!!!!!!!\n"
 
1036
        drizzled::errmsg_printf(drizzled::error::INFO,
 
1037
                _("InnoDB: !!!!!!!! UNIV_IBUF_DEBUG switched on !!!!!!!!!\n"
1083
1038
# ifdef UNIV_IBUF_COUNT_DEBUG
1084
 
                "InnoDB: !!!!!!!! UNIV_IBUF_COUNT_DEBUG switched on !!!!!!!!!\n"
1085
 
                "InnoDB: Crash recovery will fail with UNIV_IBUF_COUNT_DEBUG\n"
 
1039
                  "InnoDB: !!!!!!!! UNIV_IBUF_COUNT_DEBUG switched on !!!!!!!!!\n"
 
1040
                  "InnoDB: Crash recovery will fail with UNIV_IBUF_COUNT_DEBUG\n"
1086
1041
# endif
1087
 
                );
 
1042
                ));
1088
1043
#endif
1089
1044
 
1090
1045
#ifdef UNIV_SYNC_DEBUG
1091
 
        fprintf(stderr,
1092
 
                "InnoDB: !!!!!!!! UNIV_SYNC_DEBUG switched on !!!!!!!!!\n");
 
1046
        drizzled::errmsg_printf(drizzled::error::INFO,
 
1047
                                _("InnoDB: !!!!!!!! UNIV_SYNC_DEBUG switched on !!!!!!!!!\n"));
1093
1048
#endif
1094
1049
 
1095
1050
#ifdef UNIV_SEARCH_DEBUG
1096
 
        fprintf(stderr,
1097
 
                "InnoDB: !!!!!!!! UNIV_SEARCH_DEBUG switched on !!!!!!!!!\n");
 
1051
        drizzled::errmsg_printf(drizzled::error::INFO,
 
1052
                                _("InnoDB: !!!!!!!! UNIV_SEARCH_DEBUG switched on !!!!!!!!!\n"));
1098
1053
#endif
1099
1054
 
1100
1055
#ifdef UNIV_LOG_LSN_DEBUG
1101
 
        fprintf(stderr,
1102
 
                "InnoDB: !!!!!!!! UNIV_LOG_LSN_DEBUG switched on !!!!!!!!!\n");
 
1056
        drizzled::errmsg_printf(drizzled::error::INFO,
 
1057
                                _("InnoDB: !!!!!!!! UNIV_LOG_LSN_DEBUG switched on !!!!!!!!!\n"));
1103
1058
#endif /* UNIV_LOG_LSN_DEBUG */
1104
1059
#ifdef UNIV_MEM_DEBUG
1105
 
        fprintf(stderr,
1106
 
                "InnoDB: !!!!!!!! UNIV_MEM_DEBUG switched on !!!!!!!!!\n");
 
1060
        drizzled::errmsg_printf(drizzled::error::INFO,
 
1061
                                _("InnoDB: !!!!!!!! UNIV_MEM_DEBUG switched on !!!!!!!!!\n"));
1107
1062
#endif
1108
1063
 
1109
 
        if (UNIV_LIKELY(srv_use_sys_malloc)) {
1110
 
                fprintf(stderr,
1111
 
                        "InnoDB: The InnoDB memory heap is disabled\n");
 
1064
        if (UNIV_LIKELY(srv_use_sys_malloc))
 
1065
        {
 
1066
          drizzled::errmsg_printf(drizzled::error::INFO, _("InnoDB: The InnoDB memory heap is disabled\n"));
1112
1067
        }
1113
1068
 
1114
 
        fputs("InnoDB: " IB_ATOMICS_STARTUP_MSG
1115
 
              "\nInnoDB: Compressed tables use zlib " ZLIB_VERSION
 
1069
        drizzled::errmsg_printf(drizzled::error::INFO, "InnoDB: " IB_ATOMICS_STARTUP_MSG
 
1070
                "\nInnoDB: Compressed tables use zlib " ZLIB_VERSION
1116
1071
#ifdef UNIV_ZIP_DEBUG
1117
1072
              " with validation"
1118
1073
#endif /* UNIV_ZIP_DEBUG */
1119
1074
#ifdef UNIV_ZIP_COPY
1120
1075
              " and extra copying"
1121
1076
#endif /* UNIV_ZIP_COPY */
1122
 
              "\n" , stderr);
 
1077
              " ");
1123
1078
 
1124
1079
 
1125
1080
        /* Since InnoDB does not currently clean up all its internal data
1128
1083
        second time during the process lifetime. */
1129
1084
 
1130
1085
        if (srv_start_has_been_called) {
1131
 
                fprintf(stderr,
1132
 
                        "InnoDB: Error: startup called second time"
1133
 
                        " during the process lifetime.\n"
1134
 
                        "InnoDB: In the MySQL Embedded Server Library"
1135
 
                        " you cannot call server_init()\n"
1136
 
                        "InnoDB: more than once during"
1137
 
                        " the process lifetime.\n");
 
1086
          drizzled::errmsg_printf(drizzled::error::ERROR,
 
1087
                        "InnoDB: Error: startup called second time during the process lifetime.\n");
1138
1088
        }
1139
1089
 
1140
1090
        srv_start_has_been_called = TRUE;
1176
1126
#elif defined(LINUX_NATIVE_AIO)
1177
1127
 
1178
1128
        if (srv_use_native_aio) {
1179
 
                ut_print_timestamp(stderr);
1180
 
                fprintf(stderr,
1181
 
                        "  InnoDB: Using Linux native AIO\n");
 
1129
                drizzled::errmsg_printf(drizzled::error::INFO,
 
1130
                                        _("InnoDB: Using Linux native AIO"));
1182
1131
        }
1183
1132
#else
1184
1133
        /* Currently native AIO is supported only on windows and linux
1223
1172
                srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
1224
1173
#endif
1225
1174
        } else {
1226
 
                fprintf(stderr,
1227
 
                        "InnoDB: Unrecognized value %s for"
1228
 
                        " innodb_flush_method\n",
1229
 
                        srv_file_flush_method_str);
 
1175
          drizzled::errmsg_printf(drizzled::error::ERROR,
 
1176
                                  "InnoDB: Unrecognized value %s for innodb_flush_method",
 
1177
                                  srv_file_flush_method_str);
1230
1178
                return(DB_ERROR);
1231
1179
        }
1232
1180
 
1266
1214
                     &srv_monitor_file_mutex, SYNC_NO_ORDER_CHECK);
1267
1215
 
1268
1216
        if (srv_innodb_status) {
1269
 
                srv_monitor_file_name = mem_alloc(
 
1217
          srv_monitor_file_name = static_cast<char *>(mem_alloc(
1270
1218
                        strlen(fil_path_to_mysql_datadir)
1271
 
                        + 20 + sizeof "/innodb_status.");
 
1219
                        + 20 + sizeof "/innodb_status."));
1272
1220
                sprintf(srv_monitor_file_name, "%s/innodb_status.%lu",
1273
1221
                        fil_path_to_mysql_datadir, os_proc_get_number());
1274
1222
                srv_monitor_file = fopen(srv_monitor_file_name, "w+");
1275
1223
                if (!srv_monitor_file) {
1276
 
                        fprintf(stderr, "InnoDB: unable to create %s: %s\n",
1277
 
                                srv_monitor_file_name, strerror(errno));
 
1224
                  drizzled::errmsg_printf(drizzled::error::ERROR,
 
1225
                                          "InnoDB: unable to create %s: %s\n", srv_monitor_file_name, strerror(errno));
1278
1226
                        return(DB_ERROR);
1279
1227
                }
1280
1228
        } else {
1328
1276
                 srv_max_n_open_files);
1329
1277
 
1330
1278
        /* Print time to initialize the buffer pool */
1331
 
        ut_print_timestamp(stderr);
1332
 
        fprintf(stderr,
1333
 
                "  InnoDB: Initializing buffer pool, size =");
1334
1279
 
1335
1280
        if (srv_buf_pool_size >= 1024 * 1024 * 1024) {
1336
 
                fprintf(stderr,
1337
 
                        " %.1fG\n",
1338
 
                        ((double) 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));
1339
1283
        } else {
1340
 
                fprintf(stderr,
1341
 
                        " %.1fM\n",
1342
 
                        ((double) srv_buf_pool_size) / (1024 * 1024));
 
1284
          drizzled::errmsg_printf(drizzled::error::INFO, "InnoDB: Initializing buffer pool, size = %.1fM",
 
1285
                                  ((double) srv_buf_pool_size) / (1024 * 1024));
1343
1286
        }
1344
1287
 
1345
1288
        err = buf_pool_init(srv_buf_pool_size, srv_buf_pool_instances);
1346
1289
 
1347
 
        ut_print_timestamp(stderr);
1348
 
        fprintf(stderr,
1349
 
                "  InnoDB: Completed initialization of buffer pool\n");
 
1290
        drizzled::errmsg_printf(drizzled::error::INFO, "InnoDB: Completed initialization of buffer pool");
1350
1291
 
1351
1292
        if (err != DB_SUCCESS) {
1352
 
                fprintf(stderr,
1353
 
                        "InnoDB: Fatal error: cannot allocate the memory"
1354
 
                        " for the buffer pool\n");
 
1293
          drizzled::errmsg_printf(drizzled::error::ERROR, "InnoDB: Fatal error: cannot allocate the memory for the buffer pool");
1355
1294
 
1356
 
                return(DB_ERROR);
 
1295
          return(DB_ERROR);
1357
1296
        }
1358
1297
 
1359
1298
#ifdef UNIV_DEBUG
1362
1301
 
1363
1302
        if (srv_buf_pool_size <= 5 * 1024 * 1024) {
1364
1303
 
1365
 
                fprintf(stderr, "InnoDB: Warning: Small buffer pool size "
1366
 
                        "(%luM), the flst_validate() debug function "
1367
 
                        "can cause a deadlock if the buffer pool fills up.\n",
1368
 
                        srv_buf_pool_size / 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);
1369
1308
        }
1370
1309
#endif
1371
1310
 
1384
1323
 
1385
1324
#ifdef UNIV_LOG_ARCHIVE
1386
1325
        if (0 != ut_strcmp(srv_log_group_home_dirs[0], srv_arch_dir)) {
1387
 
                fprintf(stderr,
1388
 
                        "InnoDB: Error: you must set the log group"
1389
 
                        " home dir in my.cnf the\n"
1390
 
                        "InnoDB: same as log arch dir.\n");
 
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.");
1391
1328
 
1392
1329
                return(DB_ERROR);
1393
1330
        }
1394
1331
#endif /* UNIV_LOG_ARCHIVE */
1395
1332
 
1396
1333
        if (srv_n_log_files * srv_log_file_size >= 262144) {
1397
 
                fprintf(stderr,
1398
 
                        "InnoDB: Error: combined size of log files"
1399
 
                        " must be < 4 GB\n");
 
1334
          drizzled::errmsg_printf(drizzled::error::ERROR,
 
1335
                                  "InnoDB: Error: combined size of log files must be < 4 GB");
1400
1336
 
1401
1337
                return(DB_ERROR);
1402
1338
        }
1406
1342
        for (i = 0; i < srv_n_data_files; i++) {
1407
1343
#ifndef __WIN__
1408
1344
                if (sizeof(off_t) < 5 && srv_data_file_sizes[i] >= 262144) {
1409
 
                        fprintf(stderr,
1410
 
                                "InnoDB: Error: file size must be < 4 GB"
1411
 
                                " with this MySQL binary\n"
1412
 
                                "InnoDB: and operating system combination,"
1413
 
                                " in some OS's < 2 GB\n");
 
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");
1414
1348
 
1415
1349
                        return(DB_ERROR);
1416
1350
                }
1419
1353
        }
1420
1354
 
1421
1355
        if (sum_of_new_sizes < 10485760 / UNIV_PAGE_SIZE) {
1422
 
                fprintf(stderr,
1423
 
                        "InnoDB: Error: tablespace size must be"
1424
 
                        " at least 10 MB\n");
 
1356
          drizzled::errmsg_printf(drizzled::error::ERROR, "InnoDB: Error: tablespace size must be at least 10 MB");
1425
1357
 
1426
1358
                return(DB_ERROR);
1427
1359
        }
1433
1365
                                        &min_flushed_lsn, &max_flushed_lsn,
1434
1366
                                        &sum_of_new_sizes);
1435
1367
        if (err != DB_SUCCESS) {
1436
 
                fprintf(stderr,
1437
 
                        "InnoDB: Could not open or create data files.\n"
1438
 
                        "InnoDB: If you tried to add new data files,"
1439
 
                        " and it failed here,\n"
1440
 
                        "InnoDB: you should now edit innodb_data_file_path"
1441
 
                        " in my.cnf back\n"
1442
 
                        "InnoDB: to what it was, and remove the"
1443
 
                        " new ibdata files InnoDB created\n"
1444
 
                        "InnoDB: in this failed attempt. InnoDB only wrote"
1445
 
                        " those files full of\n"
1446
 
                        "InnoDB: zeros, but did not yet use them in any way."
1447
 
                        " But be careful: do not\n"
1448
 
                        "InnoDB: remove old data files"
1449
 
                        " which contain your precious data!\n");
 
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");
1450
1376
 
1451
1377
                return((int) err);
1452
1378
        }
1471
1397
                }
1472
1398
                if ((log_opened && create_new_db)
1473
1399
                    || (log_opened && log_created)) {
1474
 
                        fprintf(stderr,
1475
 
                                "InnoDB: Error: all log files must be"
1476
 
                                " created at the same time.\n"
1477
 
                                "InnoDB: All log files must be"
1478
 
                                " created also in database creation.\n"
1479
 
                                "InnoDB: If you want bigger or smaller"
1480
 
                                " log files, shut down the\n"
1481
 
                                "InnoDB: database and make sure there"
1482
 
                                " were no errors in shutdown.\n"
1483
 
                                "InnoDB: Then delete the existing log files."
1484
 
                                " Edit the .cnf file\n"
 
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"
1485
1406
                                "InnoDB: and start the database again.\n");
1486
1407
 
1487
1408
                        return(DB_ERROR);
1503
1424
                    || max_arch_log_no != min_arch_log_no
1504
1425
#endif /* UNIV_LOG_ARCHIVE */
1505
1426
                    ) {
1506
 
                        fprintf(stderr,
1507
 
                                "InnoDB: Cannot initialize created"
1508
 
                                " log files because\n"
1509
 
                                "InnoDB: data files were not in sync"
1510
 
                                " with each other\n"
 
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"
1511
1430
                                "InnoDB: or the data files are corrupt.\n");
1512
1431
 
1513
1432
                        return(DB_ERROR);
1514
1433
                }
1515
1434
 
1516
1435
                if (max_flushed_lsn < (ib_uint64_t) 1000) {
1517
 
                        fprintf(stderr,
1518
 
                                "InnoDB: Cannot initialize created"
1519
 
                                " log files because\n"
1520
 
                                "InnoDB: data files are corrupt,"
1521
 
                                " or new data files were\n"
1522
 
                                "InnoDB: created when the database"
1523
 
                                " was started previous\n"
1524
 
                                "InnoDB: time but the database"
1525
 
                                " was not shut down\n"
1526
 
                                "InnoDB: normally after that.\n");
 
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");
1527
1442
 
1528
1443
                        return(DB_ERROR);
1529
1444
                }
1562
1477
 
1563
1478
#ifdef UNIV_LOG_ARCHIVE
1564
1479
        } else if (srv_archive_recovery) {
1565
 
                fprintf(stderr,
1566
 
                        "InnoDB: Starting archive"
1567
 
                        " recovery from a backup...\n");
 
1480
          drizzled::errmsg_printf(drizzled::error::INFO,
 
1481
                                  "InnoDB: Starting archive recovery from a backup...");
1568
1482
                err = recv_recovery_from_archive_start(
1569
1483
                        min_flushed_lsn, srv_archive_recovery_limit_lsn,
1570
1484
                        min_arch_log_no);
1785
1699
        if (!srv_auto_extend_last_data_file
1786
1700
            && sum_of_data_file_sizes != tablespace_size_in_header) {
1787
1701
 
1788
 
                fprintf(stderr,
1789
 
                        "InnoDB: Error: tablespace size"
1790
 
                        " stored in header is %lu pages, but\n"
1791
 
                        "InnoDB: the sum of data file sizes is %lu pages\n",
1792
 
                        (ulong) tablespace_size_in_header,
1793
 
                        (ulong) sum_of_data_file_sizes);
 
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);
1794
1706
 
1795
1707
                if (srv_force_recovery == 0
1796
1708
                    && sum_of_data_file_sizes < tablespace_size_in_header) {
1797
1709
                        /* This is a fatal error, the tail of a tablespace is
1798
1710
                        missing */
1799
1711
 
1800
 
                        fprintf(stderr,
1801
 
                                "InnoDB: Cannot start InnoDB."
1802
 
                                " The tail of the system tablespace is\n"
1803
 
                                "InnoDB: missing. Have you edited"
1804
 
                                " innodb_data_file_path in my.cnf in an\n"
1805
 
                                "InnoDB: inappropriate way, removing"
1806
 
                                " ibdata files from there?\n"
1807
 
                                "InnoDB: You can set innodb_force_recovery=1"
1808
 
                                " in my.cnf to force\n"
1809
 
                                "InnoDB: a startup if you are trying"
1810
 
                                " to recover a badly corrupt database.\n");
 
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.");
1811
1718
 
1812
1719
                        return(DB_ERROR);
1813
1720
                }
1816
1723
        if (srv_auto_extend_last_data_file
1817
1724
            && sum_of_data_file_sizes < tablespace_size_in_header) {
1818
1725
 
1819
 
                fprintf(stderr,
1820
 
                        "InnoDB: Error: tablespace size stored in header"
1821
 
                        " is %lu pages, but\n"
1822
 
                        "InnoDB: the sum of data file sizes"
1823
 
                        " is only %lu pages\n",
1824
 
                        (ulong) tablespace_size_in_header,
1825
 
                        (ulong) sum_of_data_file_sizes);
 
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);
1826
1731
 
1827
1732
                if (srv_force_recovery == 0) {
1828
1733
 
1829
 
                        fprintf(stderr,
1830
 
                                "InnoDB: Cannot start InnoDB. The tail of"
1831
 
                                " the system tablespace is\n"
1832
 
                                "InnoDB: missing. Have you edited"
1833
 
                                " innodb_data_file_path in my.cnf in an\n"
1834
 
                                "InnoDB: inappropriate way, removing"
1835
 
                                " ibdata files from there?\n"
1836
 
                                "InnoDB: You can set innodb_force_recovery=1"
1837
 
                                " in my.cnf to force\n"
1838
 
                                "InnoDB: a startup if you are trying to"
1839
 
                                " recover a badly corrupt database.\n");
 
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");
1840
1740
 
1841
1741
                        return(DB_ERROR);
1842
1742
                }
1846
1746
        os_fast_mutex_init(&srv_os_test_mutex);
1847
1747
 
1848
1748
        if (0 != os_fast_mutex_trylock(&srv_os_test_mutex)) {
1849
 
                fprintf(stderr,
1850
 
                        "InnoDB: Error: pthread_mutex_trylock returns"
1851
 
                        " an unexpected value on\n"
1852
 
                        "InnoDB: success! Cannot continue.\n");
 
1749
          drizzled::errmsg_printf(drizzled::error::ERROR,
 
1750
                        "InnoDB: Error: pthread_mutex_trylock returns an unexpected value on success! Cannot continue.\n");
1853
1751
                exit(1);
1854
1752
        }
1855
1753
 
1862
1760
        os_fast_mutex_free(&srv_os_test_mutex);
1863
1761
 
1864
1762
        if (srv_print_verbose_log) {
1865
 
                ut_print_timestamp(stderr);
1866
 
                fprintf(stderr,
1867
 
                        "  InnoDB %s started; "
1868
 
                        "log sequence number %"PRIu64"\n",
1869
 
                        INNODB_VERSION_STR, srv_start_lsn);
 
1763
                drizzled::errmsg_printf(drizzled::error::INFO,
 
1764
                                        "InnoDB %s started; log sequence number %"PRIu64"\n",
 
1765
                                        INNODB_VERSION_STR, srv_start_lsn);
1870
1766
        }
1871
1767
 
1872
1768
        if (srv_force_recovery > 0) {
1873
 
                fprintf(stderr,
1874
 
                        "InnoDB: !!! innodb_force_recovery"
1875
 
                        " is set to %lu !!!\n",
1876
 
                        (ulong) srv_force_recovery);
 
1769
          drizzled::errmsg_printf(drizzled::error::ERROR,
 
1770
                                  "InnoDB: !!! innodb_force_recovery is set to %lu !!!\n",
 
1771
                                  (ulong) srv_force_recovery);
1877
1772
        }
1878
1773
 
1879
 
        fflush(stderr);
1880
 
 
1881
1774
        if (trx_doublewrite_must_reset_space_ids) {
1882
1775
                /* Actually, we did not change the undo log format between
1883
1776
                4.0 and 4.1.1, and we would not need to run purge to
1892
1785
                4.1.1. It is essential that the insert buffer is emptied
1893
1786
                here! */
1894
1787
 
1895
 
                fprintf(stderr,
1896
 
                        "InnoDB: You are upgrading to an"
1897
 
                        " InnoDB version which allows multiple\n"
1898
 
                        "InnoDB: tablespaces. Wait that purge"
1899
 
                        " and insert buffer merge run to\n"
1900
 
                        "InnoDB: completion...\n");
 
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...");
1901
1791
                for (;;) {
1902
1792
                        os_thread_sleep(1000000);
1903
1793
 
1909
1799
                                break;
1910
1800
                        }
1911
1801
                }
1912
 
                fprintf(stderr,
1913
 
                        "InnoDB: Full purge and insert buffer merge"
1914
 
                        " completed.\n");
 
1802
                drizzled::errmsg_printf(drizzled::error::INFO,
 
1803
                                        "InnoDB: Full purge and insert buffer merge completed.");
1915
1804
 
1916
1805
                trx_sys_mark_upgraded_to_multiple_tablespaces();
1917
1806
 
1918
 
                fprintf(stderr,
1919
 
                        "InnoDB: You have now successfully upgraded"
1920
 
                        " to the multiple tablespaces\n"
1921
 
                        "InnoDB: format. You should NOT DOWNGRADE"
1922
 
                        " to an earlier version of\n"
1923
 
                        "InnoDB: InnoDB! But if you absolutely need to"
1924
 
                        " downgrade, see\n"
1925
 
                        "InnoDB: " REFMAN "multiple-tablespaces.html\n"
1926
 
                        "InnoDB: for instructions.\n");
 
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"
 
1813
                                        " downgrade, see\n"
 
1814
                                        "InnoDB: " REFMAN "multiple-tablespaces.html\n"
 
1815
                                        "InnoDB: for instructions.\n");
1927
1816
        }
1928
1817
 
1929
1818
        if (srv_force_recovery == 0) {
1953
1842
        ulint   i;
1954
1843
        if (!srv_was_started) {
1955
1844
                if (srv_is_being_started) {
1956
 
                        ut_print_timestamp(stderr);
1957
 
                        fprintf(stderr,
1958
 
                                "  InnoDB: Warning: shutting down"
1959
 
                                " a not properly started\n"
1960
 
                                "InnoDB: or created database!\n");
 
1845
                  drizzled::errmsg_printf(drizzled::error::ERROR,
 
1846
                                "InnoDB: Warning: shutting down a not properly started or created database!");
1961
1847
                }
1962
1848
 
1963
1849
                return(DB_SUCCESS);
1970
1856
 
1971
1857
 
1972
1858
        if (srv_fast_shutdown == 2) {
1973
 
                ut_print_timestamp(stderr);
1974
 
                fprintf(stderr,
1975
 
                        "  InnoDB: MySQL has requested a very fast shutdown"
1976
 
                        " without flushing "
1977
 
                        "the InnoDB buffer pool to data files."
1978
 
                        " At the next mysqld startup "
1979
 
                        "InnoDB will do a crash recovery!\n");
 
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!");
1980
1863
        }
1981
1864
 
1982
1865
        logs_empty_and_mark_files_at_shutdown();
1983
1866
 
1984
1867
        if (srv_conc_n_threads != 0) {
1985
 
                fprintf(stderr,
1986
 
                        "InnoDB: Warning: query counter shows %ld queries"
1987
 
                        " still\n"
1988
 
                        "InnoDB: inside InnoDB at shutdown\n",
1989
 
                        srv_conc_n_threads);
 
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);
1990
1871
        }
1991
1872
 
1992
1873
        /* 2. Make all threads created by InnoDB to exit */
2049
1930
        }
2050
1931
 
2051
1932
        if (i == 1000) {
2052
 
                fprintf(stderr,
2053
 
                        "InnoDB: Warning: %lu threads created by InnoDB"
2054
 
                        " had not exited at shutdown!\n",
 
1933
          drizzled::errmsg_printf(drizzled::error::WARN,
 
1934
                        "InnoDB: Warning: %lu threads created by InnoDB had not exited at shutdown!",
2055
1935
                        (ulong) os_thread_count);
2056
1936
        }
2057
1937
 
2117
1997
            || os_event_count != 0
2118
1998
            || os_mutex_count != 0
2119
1999
            || os_fast_mutex_count != 0) {
2120
 
                fprintf(stderr,
2121
 
                        "InnoDB: Warning: some resources were not"
2122
 
                        " cleaned up in shutdown:\n"
2123
 
                        "InnoDB: threads %lu, events %lu,"
2124
 
                        " os_mutexes %lu, os_fast_mutexes %lu\n",
2125
 
                        (ulong) os_thread_count, (ulong) os_event_count,
2126
 
                        (ulong) os_mutex_count, (ulong) os_fast_mutex_count);
 
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);
2127
2005
        }
2128
2006
 
2129
2007
        if (dict_foreign_err_file) {
2134
2012
        }
2135
2013
 
2136
2014
        if (srv_print_verbose_log) {
2137
 
                ut_print_timestamp(stderr);
2138
 
                fprintf(stderr,
2139
 
                        "  InnoDB: Shutdown completed;"
2140
 
                        " log sequence number %"PRIu64"\n",
2141
 
                        srv_shutdown_lsn);
 
2015
                drizzled::errmsg_printf(drizzled::error::INFO,
 
2016
                                        "InnoDB: Shutdown completed log sequence number %"PRIu64,
 
2017
                                        srv_shutdown_lsn);
2142
2018
        }
2143
2019
 
2144
2020
        srv_was_started = FALSE;