~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2010-12-08 18:53:46 UTC
  • mto: This revision was merged to the branch mainline in revision 1983.
  • Revision ID: brian@tangent.org-20101208185346-89uak2ofyivk1yss
Update schema, make sure that it always ruturns a valid string (it just
makes the entire interface simpler to use).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
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, 2010, Innobase Oy. All Rights Reserved.
 
4
Copyright (c) 2008, Google Inc.
 
5
Copyright (c) 2009, Percona Inc.
6
6
 
7
7
Portions of this file contain modifications contributed and copyrighted by
8
8
Google, Inc. Those modifications are gratefully acknowledged and are described
92
92
#include <errno.h>
93
93
#include <unistd.h>
94
94
 
95
 
#include <drizzled/gettext.h> 
96
 
#include <drizzled/errmsg_print.h>
97
 
 
98
95
/** Log sequence number immediately after startup */
99
96
UNIV_INTERN ib_uint64_t srv_start_lsn;
100
97
/** Log sequence number at shutdown */
126
123
/** Files comprising the system tablespace */
127
124
static os_file_t        files[1000];
128
125
 
 
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
 
129
131
/** io_handler_thread parameters for thread identification */
130
132
static ulint            n[SRV_MAX_N_IO_THREADS + 6];
131
133
/** io_handler_thread identifiers */
152
154
UNIV_INTERN mysql_pfs_key_t     srv_master_thread_key;
153
155
#endif /* UNIV_PFS_THREAD */
154
156
 
 
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
 
155
162
/*********************************************************************//**
156
163
Convert a numeric string that optionally ends in G or M, to a number
157
164
containing megabytes.
282
289
                return(FALSE);
283
290
        }
284
291
 
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));
 
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);
289
296
 
290
297
        srv_n_data_files = i;
291
298
 
415
422
                return(FALSE);
416
423
        }
417
424
 
418
 
        srv_log_group_home_dirs = static_cast<char **>(malloc(i * sizeof *srv_log_group_home_dirs));
 
425
        srv_log_group_home_dirs = malloc(i * sizeof *srv_log_group_home_dirs);
419
426
 
420
427
        /* Then store the actual values to our array */
421
428
 
464
471
/********************************************************************//**
465
472
I/o-handler thread function.
466
473
@return OS_THREAD_DUMMY_RETURN */
467
 
extern "C"
468
 
os_thread_ret_t
469
 
io_handler_thread(void* arg);
470
 
 
471
 
extern "C"
 
474
static
472
475
os_thread_ret_t
473
476
io_handler_thread(
474
477
/*==============*/
490
493
 
491
494
        while (srv_shutdown_state != SRV_SHUTDOWN_EXIT_THREADS) {
492
495
                fil_aio_wait(segment);
 
496
 
 
497
                mutex_enter(&ios_mutex);
 
498
                ios++;
 
499
                mutex_exit(&ios_mutex);
493
500
        }
494
501
 
 
502
        thr_local_free(os_thread_get_curr_id());
 
503
 
495
504
        /* We count the number of threads in os_thread_exit(). A created
496
505
        thread should always use that to exit and not use return() to exit.
497
506
        The thread actually never comes here because it is exited in an
512
521
void
513
522
srv_normalize_path_for_win(
514
523
/*=======================*/
515
 
        char*   /*str __attribute__((unused))*/)        /*!< in/out: null-terminated
 
524
        char*   str __attribute__((unused)))    /*!< in/out: null-terminated
516
525
                                                character string */
517
526
{
518
527
#ifdef __WIN__
604
613
                    && os_file_get_last_error(FALSE) != 100
605
614
#endif
606
615
                    ) {
607
 
                  drizzled::errmsg_printf(drizzled::error::ERROR,
608
 
                                          "InnoDB: Error in creating or opening %s", name);
 
616
                        fprintf(stderr,
 
617
                                "InnoDB: Error in creating"
 
618
                                " or opening %s\n", name);
609
619
 
610
 
                  return(DB_ERROR);
 
620
                        return(DB_ERROR);
611
621
                }
612
622
 
613
623
                files[i] = os_file_create(innodb_file_log_key, name,
614
624
                                          OS_FILE_OPEN, OS_FILE_AIO,
615
625
                                          OS_LOG_FILE, &ret);
616
626
                if (!ret) {
617
 
                  drizzled::errmsg_printf(drizzled::error::ERROR,
618
 
                                          "InnoDB: Error in opening %s.", name);
 
627
                        fprintf(stderr,
 
628
                                "InnoDB: Error in opening %s\n", name);
619
629
 
620
630
                        return(DB_ERROR);
621
631
                }
626
636
                if (size != srv_calc_low32(srv_log_file_size)
627
637
                    || size_high != srv_calc_high32(srv_log_file_size)) {
628
638
 
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));
 
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));
635
647
 
636
648
                        return(DB_ERROR);
637
649
                }
638
650
        } else {
639
651
                *log_file_created = TRUE;
640
652
 
641
 
                drizzled::errmsg_printf(drizzled::error::INFO,
642
 
                                        "InnoDB: Log file %s did not exist: new to be created",
643
 
                                        name);
 
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);
644
659
                if (log_file_has_been_opened) {
645
660
 
646
661
                        return(DB_ERROR);
647
662
                }
648
663
 
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));
 
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));
653
667
 
654
 
                drizzled::errmsg_printf(drizzled::error::INFO,
655
 
                                        "InnoDB: Database physically writes the file full: wait...\n");
 
668
                fprintf(stderr,
 
669
                        "InnoDB: Database physically writes the file"
 
670
                        " full: wait...\n");
656
671
 
657
672
                ret = os_file_set_size(name, files[i],
658
673
                                       srv_calc_low32(srv_log_file_size),
659
674
                                       srv_calc_high32(srv_log_file_size));
660
675
                if (!ret) {
661
 
                  drizzled::errmsg_printf(drizzled::error::ERROR,
662
 
                                          "InnoDB: Error in creating %s: probably out of disk space",
663
 
                                          name);
 
676
                        fprintf(stderr,
 
677
                                "InnoDB: Error in creating %s:"
 
678
                                " probably out of disk space\n",
 
679
                                name);
664
680
 
665
681
                        return(DB_ERROR);
666
682
                }
737
753
        char    name[10000];
738
754
 
739
755
        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);
 
756
                fprintf(stderr, "InnoDB: can only have < 1000 data files\n"
 
757
                        "InnoDB: you have defined %lu\n",
 
758
                        (ulong) srv_n_data_files);
743
759
                return(DB_ERROR);
744
760
        }
745
761
 
784
800
                            && os_file_get_last_error(FALSE) != 100
785
801
#endif
786
802
                            ) {
787
 
                          drizzled::errmsg_printf(drizzled::error::ERROR,
788
 
                                                  "InnoDB: Error in creating or opening %s",
789
 
                                                  name);
 
803
                                fprintf(stderr,
 
804
                                        "InnoDB: Error in creating"
 
805
                                        " or opening %s\n",
 
806
                                        name);
790
807
 
791
808
                                return(DB_ERROR);
792
809
                        }
802
819
                                                  OS_FILE_NORMAL,
803
820
                                                  OS_DATA_FILE, &ret);
804
821
                        if (!ret) {
805
 
                          drizzled::errmsg_printf(drizzled::error::ERROR,
806
 
                                                  "InnoDB: Error in opening %s", name);
 
822
                                fprintf(stderr,
 
823
                                        "InnoDB: Error in opening %s\n", name);
807
824
 
808
825
                                return(DB_ERROR);
809
826
                        }
819
836
                        /* We open the data file */
820
837
 
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.",
825
 
                                        name);
 
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);
826
846
                                return(DB_ERROR);
827
847
                        }
828
848
 
844
864
                        }
845
865
 
846
866
                        if (!ret) {
847
 
                          drizzled::errmsg_printf(drizzled::error::ERROR,
848
 
                                                  "InnoDB: Error in opening %s", name);
 
867
                                fprintf(stderr,
 
868
                                        "InnoDB: Error in opening %s\n", name);
849
869
                                os_file_get_last_error(TRUE);
850
870
 
851
871
                                return(DB_ERROR);
872
892
                                        && srv_last_file_size_max
873
893
                                        < rounded_size_pages)) {
874
894
 
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);
 
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);
884
910
 
885
911
                                        return(DB_ERROR);
886
912
                                }
890
916
 
891
917
                        if (rounded_size_pages != srv_data_file_sizes[i]) {
892
918
 
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!",
 
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",
897
926
                                        name,
898
927
                                        (ulong) rounded_size_pages,
899
928
                                        (ulong) srv_data_file_sizes[i]);
915
944
                        one_created = TRUE;
916
945
 
917
946
                        if (i > 0) {
918
 
                                drizzled::errmsg_printf(drizzled::error::INFO,
919
 
                                        "  InnoDB: Data file %s did not exist: new to be created",
 
947
                                ut_print_timestamp(stderr);
 
948
                                fprintf(stderr,
 
949
                                        "  InnoDB: Data file %s did not"
 
950
                                        " exist: new to be created\n",
920
951
                                        name);
921
952
                        } else {
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);
 
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);
924
958
                                *create_new_db = TRUE;
925
959
                        }
926
960
 
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)));
 
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)));
931
967
 
932
 
                        drizzled::errmsg_printf(drizzled::error::INFO,
933
 
                                "InnoDB: Database physically writes the file full: wait...");
 
968
                        fprintf(stderr,
 
969
                                "InnoDB: Database physically writes the"
 
970
                                " file full: wait...\n");
934
971
 
935
972
                        ret = os_file_set_size(
936
973
                                name, files[i],
938
975
                                srv_calc_high32(srv_data_file_sizes[i]));
939
976
 
940
977
                        if (!ret) {
941
 
                          drizzled::errmsg_printf(drizzled::error::ERROR,
942
 
                                                  "InnoDB: Error in creating %s: probably out of disk space", name);
 
978
                                fprintf(stderr,
 
979
                                        "InnoDB: Error in creating %s:"
 
980
                                        " probably out of disk space\n", name);
943
981
 
944
982
                                return(DB_ERROR);
945
983
                        }
961
999
                                srv_data_file_is_raw_partition[i] != 0);
962
1000
        }
963
1001
 
 
1002
        ios = 0;
 
1003
 
 
1004
        mutex_create(ios_mutex_key, &ios_mutex, SYNC_NO_ORDER_CHECK);
 
1005
 
964
1006
        return(DB_SUCCESS);
965
1007
}
966
1008
 
1003
1045
        on Mac OS X 10.3 or later. */
1004
1046
        struct utsname utsname;
1005
1047
        if (uname(&utsname)) {
1006
 
                fputs(_("InnoDB: cannot determine Mac OS X version!\n"), stderr);
 
1048
                fputs("InnoDB: cannot determine Mac OS X version!\n", stderr);
1007
1049
        } else {
1008
1050
                srv_have_fullfsync = strcmp(utsname.release, "7.") >= 0;
1009
1051
        }
1010
1052
        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);
 
1053
                fputs("InnoDB: On Mac OS X, fsync() may be"
 
1054
                      " broken on internal drives,\n"
 
1055
                      "InnoDB: making transactions unsafe!\n", stderr);
1014
1056
        }
1015
1057
# endif /* F_FULLFSYNC */
1016
1058
#endif /* HAVE_DARWIN_THREADS */
1017
1059
 
1018
1060
        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."),
 
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.",
1022
1067
                        (ulong)sizeof(ulint), (ulong)sizeof(void*));
1023
1068
        }
1024
1069
 
1028
1073
        innodb_file_per_table) until this function has returned. */
1029
1074
        srv_file_per_table = FALSE;
1030
1075
#ifdef UNIV_DEBUG
1031
 
        drizzled::errmsg_printf(drizzled::error::INFO,
1032
 
                                _("InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!\n"));
 
1076
        fprintf(stderr,
 
1077
                "InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!\n");
1033
1078
#endif
1034
1079
 
1035
1080
#ifdef UNIV_IBUF_DEBUG
1036
 
        drizzled::errmsg_printf(drizzled::error::INFO,
1037
 
                _("InnoDB: !!!!!!!! UNIV_IBUF_DEBUG switched on !!!!!!!!!\n"
 
1081
        fprintf(stderr,
 
1082
                "InnoDB: !!!!!!!! UNIV_IBUF_DEBUG switched on !!!!!!!!!\n"
1038
1083
# 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"
 
1084
                "InnoDB: !!!!!!!! UNIV_IBUF_COUNT_DEBUG switched on !!!!!!!!!\n"
 
1085
                "InnoDB: Crash recovery will fail with UNIV_IBUF_COUNT_DEBUG\n"
1041
1086
# endif
1042
 
                ));
 
1087
                );
1043
1088
#endif
1044
1089
 
1045
1090
#ifdef UNIV_SYNC_DEBUG
1046
 
        drizzled::errmsg_printf(drizzled::error::INFO,
1047
 
                                _("InnoDB: !!!!!!!! UNIV_SYNC_DEBUG switched on !!!!!!!!!\n"));
 
1091
        fprintf(stderr,
 
1092
                "InnoDB: !!!!!!!! UNIV_SYNC_DEBUG switched on !!!!!!!!!\n");
1048
1093
#endif
1049
1094
 
1050
1095
#ifdef UNIV_SEARCH_DEBUG
1051
 
        drizzled::errmsg_printf(drizzled::error::INFO,
1052
 
                                _("InnoDB: !!!!!!!! UNIV_SEARCH_DEBUG switched on !!!!!!!!!\n"));
 
1096
        fprintf(stderr,
 
1097
                "InnoDB: !!!!!!!! UNIV_SEARCH_DEBUG switched on !!!!!!!!!\n");
1053
1098
#endif
1054
1099
 
1055
1100
#ifdef UNIV_LOG_LSN_DEBUG
1056
 
        drizzled::errmsg_printf(drizzled::error::INFO,
1057
 
                                _("InnoDB: !!!!!!!! UNIV_LOG_LSN_DEBUG switched on !!!!!!!!!\n"));
 
1101
        fprintf(stderr,
 
1102
                "InnoDB: !!!!!!!! UNIV_LOG_LSN_DEBUG switched on !!!!!!!!!\n");
1058
1103
#endif /* UNIV_LOG_LSN_DEBUG */
1059
1104
#ifdef UNIV_MEM_DEBUG
1060
 
        drizzled::errmsg_printf(drizzled::error::INFO,
1061
 
                                _("InnoDB: !!!!!!!! UNIV_MEM_DEBUG switched on !!!!!!!!!\n"));
 
1105
        fprintf(stderr,
 
1106
                "InnoDB: !!!!!!!! UNIV_MEM_DEBUG switched on !!!!!!!!!\n");
1062
1107
#endif
1063
1108
 
1064
 
        if (UNIV_LIKELY(srv_use_sys_malloc))
1065
 
        {
1066
 
          drizzled::errmsg_printf(drizzled::error::INFO, _("InnoDB: The InnoDB memory heap is disabled\n"));
 
1109
        if (UNIV_LIKELY(srv_use_sys_malloc)) {
 
1110
                fprintf(stderr,
 
1111
                        "InnoDB: The InnoDB memory heap is disabled\n");
1067
1112
        }
1068
1113
 
1069
 
        drizzled::errmsg_printf(drizzled::error::INFO, "InnoDB: " IB_ATOMICS_STARTUP_MSG
1070
 
                "\nInnoDB: Compressed tables use zlib " ZLIB_VERSION
 
1114
        fputs("InnoDB: " IB_ATOMICS_STARTUP_MSG
 
1115
              "\nInnoDB: Compressed tables use zlib " ZLIB_VERSION
1071
1116
#ifdef UNIV_ZIP_DEBUG
1072
1117
              " with validation"
1073
1118
#endif /* UNIV_ZIP_DEBUG */
1074
1119
#ifdef UNIV_ZIP_COPY
1075
1120
              " and extra copying"
1076
1121
#endif /* UNIV_ZIP_COPY */
1077
 
              " ");
 
1122
              "\n" , stderr);
1078
1123
 
1079
1124
 
1080
1125
        /* Since InnoDB does not currently clean up all its internal data
1083
1128
        second time during the process lifetime. */
1084
1129
 
1085
1130
        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");
 
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");
1088
1138
        }
1089
1139
 
1090
1140
        srv_start_has_been_called = TRUE;
1126
1176
#elif defined(LINUX_NATIVE_AIO)
1127
1177
 
1128
1178
        if (srv_use_native_aio) {
1129
 
                drizzled::errmsg_printf(drizzled::error::INFO,
1130
 
                                        _("InnoDB: Using Linux native AIO"));
 
1179
                ut_print_timestamp(stderr);
 
1180
                fprintf(stderr,
 
1181
                        "  InnoDB: Using Linux native AIO\n");
1131
1182
        }
1132
1183
#else
1133
1184
        /* Currently native AIO is supported only on windows and linux
1172
1223
                srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
1173
1224
#endif
1174
1225
        } else {
1175
 
          drizzled::errmsg_printf(drizzled::error::ERROR,
1176
 
                                  "InnoDB: Unrecognized value %s for innodb_flush_method",
1177
 
                                  srv_file_flush_method_str);
 
1226
                fprintf(stderr,
 
1227
                        "InnoDB: Unrecognized value %s for"
 
1228
                        " innodb_flush_method\n",
 
1229
                        srv_file_flush_method_str);
1178
1230
                return(DB_ERROR);
1179
1231
        }
1180
1232
 
1214
1266
                     &srv_monitor_file_mutex, SYNC_NO_ORDER_CHECK);
1215
1267
 
1216
1268
        if (srv_innodb_status) {
1217
 
          srv_monitor_file_name = static_cast<char *>(mem_alloc(
 
1269
                srv_monitor_file_name = mem_alloc(
1218
1270
                        strlen(fil_path_to_mysql_datadir)
1219
 
                        + 20 + sizeof "/innodb_status."));
 
1271
                        + 20 + sizeof "/innodb_status.");
1220
1272
                sprintf(srv_monitor_file_name, "%s/innodb_status.%lu",
1221
1273
                        fil_path_to_mysql_datadir, os_proc_get_number());
1222
1274
                srv_monitor_file = fopen(srv_monitor_file_name, "w+");
1223
1275
                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));
 
1276
                        fprintf(stderr, "InnoDB: unable to create %s: %s\n",
 
1277
                                srv_monitor_file_name, strerror(errno));
1226
1278
                        return(DB_ERROR);
1227
1279
                }
1228
1280
        } else {
1275
1327
        fil_init(srv_file_per_table ? 50000 : 5000,
1276
1328
                 srv_max_n_open_files);
1277
1329
 
1278
 
        /* Print time to initialize the buffer pool */
1279
 
 
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));
1283
 
        } else {
1284
 
          drizzled::errmsg_printf(drizzled::error::INFO, "InnoDB: Initializing buffer pool, size = %.1fM",
1285
 
                                  ((double) srv_buf_pool_size) / (1024 * 1024));
1286
 
        }
1287
 
 
1288
1330
        err = buf_pool_init(srv_buf_pool_size, srv_buf_pool_instances);
1289
1331
 
1290
 
        drizzled::errmsg_printf(drizzled::error::INFO, "InnoDB: Completed initialization of buffer pool");
1291
 
 
1292
1332
        if (err != DB_SUCCESS) {
1293
 
          drizzled::errmsg_printf(drizzled::error::ERROR, "InnoDB: Fatal error: cannot allocate the memory for the buffer pool");
 
1333
                fprintf(stderr,
 
1334
                        "InnoDB: Fatal error: cannot allocate the memory"
 
1335
                        " for the buffer pool\n");
1294
1336
 
1295
 
          return(DB_ERROR);
 
1337
                return(DB_ERROR);
1296
1338
        }
1297
1339
 
1298
1340
#ifdef UNIV_DEBUG
1301
1343
 
1302
1344
        if (srv_buf_pool_size <= 5 * 1024 * 1024) {
1303
1345
 
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);
 
1346
                fprintf(stderr, "InnoDB: Warning: Small buffer pool size "
 
1347
                        "(%luM), the flst_validate() debug function "
 
1348
                        "can cause a deadlock if the buffer pool fills up.\n",
 
1349
                        srv_buf_pool_size / 1024 / 1024);
1308
1350
        }
1309
1351
#endif
1310
1352
 
1323
1365
 
1324
1366
#ifdef UNIV_LOG_ARCHIVE
1325
1367
        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.");
 
1368
                fprintf(stderr,
 
1369
                        "InnoDB: Error: you must set the log group"
 
1370
                        " home dir in my.cnf the\n"
 
1371
                        "InnoDB: same as log arch dir.\n");
1328
1372
 
1329
1373
                return(DB_ERROR);
1330
1374
        }
1331
1375
#endif /* UNIV_LOG_ARCHIVE */
1332
1376
 
1333
1377
        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");
 
1378
                fprintf(stderr,
 
1379
                        "InnoDB: Error: combined size of log files"
 
1380
                        " must be < 4 GB\n");
1336
1381
 
1337
1382
                return(DB_ERROR);
1338
1383
        }
1342
1387
        for (i = 0; i < srv_n_data_files; i++) {
1343
1388
#ifndef __WIN__
1344
1389
                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");
 
1390
                        fprintf(stderr,
 
1391
                                "InnoDB: Error: file size must be < 4 GB"
 
1392
                                " with this MySQL binary\n"
 
1393
                                "InnoDB: and operating system combination,"
 
1394
                                " in some OS's < 2 GB\n");
1348
1395
 
1349
1396
                        return(DB_ERROR);
1350
1397
                }
1353
1400
        }
1354
1401
 
1355
1402
        if (sum_of_new_sizes < 10485760 / UNIV_PAGE_SIZE) {
1356
 
          drizzled::errmsg_printf(drizzled::error::ERROR, "InnoDB: Error: tablespace size must be at least 10 MB");
 
1403
                fprintf(stderr,
 
1404
                        "InnoDB: Error: tablespace size must be"
 
1405
                        " at least 10 MB\n");
1357
1406
 
1358
1407
                return(DB_ERROR);
1359
1408
        }
1365
1414
                                        &min_flushed_lsn, &max_flushed_lsn,
1366
1415
                                        &sum_of_new_sizes);
1367
1416
        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");
 
1417
                fprintf(stderr,
 
1418
                        "InnoDB: Could not open or create data files.\n"
 
1419
                        "InnoDB: If you tried to add new data files,"
 
1420
                        " and it failed here,\n"
 
1421
                        "InnoDB: you should now edit innodb_data_file_path"
 
1422
                        " in my.cnf back\n"
 
1423
                        "InnoDB: to what it was, and remove the"
 
1424
                        " new ibdata files InnoDB created\n"
 
1425
                        "InnoDB: in this failed attempt. InnoDB only wrote"
 
1426
                        " those files full of\n"
 
1427
                        "InnoDB: zeros, but did not yet use them in any way."
 
1428
                        " But be careful: do not\n"
 
1429
                        "InnoDB: remove old data files"
 
1430
                        " which contain your precious data!\n");
1376
1431
 
1377
1432
                return((int) err);
1378
1433
        }
1397
1452
                }
1398
1453
                if ((log_opened && create_new_db)
1399
1454
                    || (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"
 
1455
                        fprintf(stderr,
 
1456
                                "InnoDB: Error: all log files must be"
 
1457
                                " created at the same time.\n"
 
1458
                                "InnoDB: All log files must be"
 
1459
                                " created also in database creation.\n"
 
1460
                                "InnoDB: If you want bigger or smaller"
 
1461
                                " log files, shut down the\n"
 
1462
                                "InnoDB: database and make sure there"
 
1463
                                " were no errors in shutdown.\n"
 
1464
                                "InnoDB: Then delete the existing log files."
 
1465
                                " Edit the .cnf file\n"
1406
1466
                                "InnoDB: and start the database again.\n");
1407
1467
 
1408
1468
                        return(DB_ERROR);
1424
1484
                    || max_arch_log_no != min_arch_log_no
1425
1485
#endif /* UNIV_LOG_ARCHIVE */
1426
1486
                    ) {
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"
 
1487
                        fprintf(stderr,
 
1488
                                "InnoDB: Cannot initialize created"
 
1489
                                " log files because\n"
 
1490
                                "InnoDB: data files were not in sync"
 
1491
                                " with each other\n"
1430
1492
                                "InnoDB: or the data files are corrupt.\n");
1431
1493
 
1432
1494
                        return(DB_ERROR);
1433
1495
                }
1434
1496
 
1435
1497
                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");
 
1498
                        fprintf(stderr,
 
1499
                                "InnoDB: Cannot initialize created"
 
1500
                                " log files because\n"
 
1501
                                "InnoDB: data files are corrupt,"
 
1502
                                " or new data files were\n"
 
1503
                                "InnoDB: created when the database"
 
1504
                                " was started previous\n"
 
1505
                                "InnoDB: time but the database"
 
1506
                                " was not shut down\n"
 
1507
                                "InnoDB: normally after that.\n");
1442
1508
 
1443
1509
                        return(DB_ERROR);
1444
1510
                }
1477
1543
 
1478
1544
#ifdef UNIV_LOG_ARCHIVE
1479
1545
        } else if (srv_archive_recovery) {
1480
 
          drizzled::errmsg_printf(drizzled::error::INFO,
1481
 
                                  "InnoDB: Starting archive recovery from a backup...");
 
1546
                fprintf(stderr,
 
1547
                        "InnoDB: Starting archive"
 
1548
                        " recovery from a backup...\n");
1482
1549
                err = recv_recovery_from_archive_start(
1483
1550
                        min_flushed_lsn, srv_archive_recovery_limit_lsn,
1484
1551
                        min_arch_log_no);
1699
1766
        if (!srv_auto_extend_last_data_file
1700
1767
            && sum_of_data_file_sizes != tablespace_size_in_header) {
1701
1768
 
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);
 
1769
                fprintf(stderr,
 
1770
                        "InnoDB: Error: tablespace size"
 
1771
                        " stored in header is %lu pages, but\n"
 
1772
                        "InnoDB: the sum of data file sizes is %lu pages\n",
 
1773
                        (ulong) tablespace_size_in_header,
 
1774
                        (ulong) sum_of_data_file_sizes);
1706
1775
 
1707
1776
                if (srv_force_recovery == 0
1708
1777
                    && sum_of_data_file_sizes < tablespace_size_in_header) {
1709
1778
                        /* This is a fatal error, the tail of a tablespace is
1710
1779
                        missing */
1711
1780
 
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.");
 
1781
                        fprintf(stderr,
 
1782
                                "InnoDB: Cannot start InnoDB."
 
1783
                                " The tail of the system tablespace is\n"
 
1784
                                "InnoDB: missing. Have you edited"
 
1785
                                " innodb_data_file_path in my.cnf in an\n"
 
1786
                                "InnoDB: inappropriate way, removing"
 
1787
                                " ibdata files from there?\n"
 
1788
                                "InnoDB: You can set innodb_force_recovery=1"
 
1789
                                " in my.cnf to force\n"
 
1790
                                "InnoDB: a startup if you are trying"
 
1791
                                " to recover a badly corrupt database.\n");
1718
1792
 
1719
1793
                        return(DB_ERROR);
1720
1794
                }
1723
1797
        if (srv_auto_extend_last_data_file
1724
1798
            && sum_of_data_file_sizes < tablespace_size_in_header) {
1725
1799
 
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);
 
1800
                fprintf(stderr,
 
1801
                        "InnoDB: Error: tablespace size stored in header"
 
1802
                        " is %lu pages, but\n"
 
1803
                        "InnoDB: the sum of data file sizes"
 
1804
                        " is only %lu pages\n",
 
1805
                        (ulong) tablespace_size_in_header,
 
1806
                        (ulong) sum_of_data_file_sizes);
1731
1807
 
1732
1808
                if (srv_force_recovery == 0) {
1733
1809
 
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");
 
1810
                        fprintf(stderr,
 
1811
                                "InnoDB: Cannot start InnoDB. The tail of"
 
1812
                                " the system tablespace is\n"
 
1813
                                "InnoDB: missing. Have you edited"
 
1814
                                " innodb_data_file_path in my.cnf in an\n"
 
1815
                                "InnoDB: inappropriate way, removing"
 
1816
                                " ibdata files from there?\n"
 
1817
                                "InnoDB: You can set innodb_force_recovery=1"
 
1818
                                " in my.cnf to force\n"
 
1819
                                "InnoDB: a startup if you are trying to"
 
1820
                                " recover a badly corrupt database.\n");
1740
1821
 
1741
1822
                        return(DB_ERROR);
1742
1823
                }
1746
1827
        os_fast_mutex_init(&srv_os_test_mutex);
1747
1828
 
1748
1829
        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");
 
1830
                fprintf(stderr,
 
1831
                        "InnoDB: Error: pthread_mutex_trylock returns"
 
1832
                        " an unexpected value on\n"
 
1833
                        "InnoDB: success! Cannot continue.\n");
1751
1834
                exit(1);
1752
1835
        }
1753
1836
 
1760
1843
        os_fast_mutex_free(&srv_os_test_mutex);
1761
1844
 
1762
1845
        if (srv_print_verbose_log) {
1763
 
                drizzled::errmsg_printf(drizzled::error::INFO,
1764
 
                                        "InnoDB %s started; log sequence number %"PRIu64"\n",
1765
 
                                        INNODB_VERSION_STR, srv_start_lsn);
 
1846
                ut_print_timestamp(stderr);
 
1847
                fprintf(stderr,
 
1848
                        " InnoDB %s started; "
 
1849
                        "log sequence number %"PRIu64"\n",
 
1850
                        INNODB_VERSION_STR, srv_start_lsn);
1766
1851
        }
1767
1852
 
1768
1853
        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);
 
1854
                fprintf(stderr,
 
1855
                        "InnoDB: !!! innodb_force_recovery"
 
1856
                        " is set to %lu !!!\n",
 
1857
                        (ulong) srv_force_recovery);
1772
1858
        }
1773
1859
 
 
1860
        fflush(stderr);
 
1861
 
1774
1862
        if (trx_doublewrite_must_reset_space_ids) {
1775
1863
                /* Actually, we did not change the undo log format between
1776
1864
                4.0 and 4.1.1, and we would not need to run purge to
1785
1873
                4.1.1. It is essential that the insert buffer is emptied
1786
1874
                here! */
1787
1875
 
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...");
 
1876
                fprintf(stderr,
 
1877
                        "InnoDB: You are upgrading to an"
 
1878
                        " InnoDB version which allows multiple\n"
 
1879
                        "InnoDB: tablespaces. Wait that purge"
 
1880
                        " and insert buffer merge run to\n"
 
1881
                        "InnoDB: completion...\n");
1791
1882
                for (;;) {
1792
1883
                        os_thread_sleep(1000000);
1793
1884
 
1799
1890
                                break;
1800
1891
                        }
1801
1892
                }
1802
 
                drizzled::errmsg_printf(drizzled::error::INFO,
1803
 
                                        "InnoDB: Full purge and insert buffer merge completed.");
 
1893
                fprintf(stderr,
 
1894
                        "InnoDB: Full purge and insert buffer merge"
 
1895
                        " completed.\n");
1804
1896
 
1805
1897
                trx_sys_mark_upgraded_to_multiple_tablespaces();
1806
1898
 
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");
 
1899
                fprintf(stderr,
 
1900
                        "InnoDB: You have now successfully upgraded"
 
1901
                        " to the multiple tablespaces\n"
 
1902
                        "InnoDB: format. You should NOT DOWNGRADE"
 
1903
                        " to an earlier version of\n"
 
1904
                        "InnoDB: InnoDB! But if you absolutely need to"
 
1905
                        " downgrade, see\n"
 
1906
                        "InnoDB: " REFMAN "multiple-tablespaces.html\n"
 
1907
                        "InnoDB: for instructions.\n");
1816
1908
        }
1817
1909
 
1818
1910
        if (srv_force_recovery == 0) {
1842
1934
        ulint   i;
1843
1935
        if (!srv_was_started) {
1844
1936
                if (srv_is_being_started) {
1845
 
                  drizzled::errmsg_printf(drizzled::error::ERROR,
1846
 
                                "InnoDB: Warning: shutting down a not properly started or created database!");
 
1937
                        ut_print_timestamp(stderr);
 
1938
                        fprintf(stderr,
 
1939
                                "  InnoDB: Warning: shutting down"
 
1940
                                " a not properly started\n"
 
1941
                                "InnoDB: or created database!\n");
1847
1942
                }
1848
1943
 
1849
1944
                return(DB_SUCCESS);
1856
1951
 
1857
1952
 
1858
1953
        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!");
 
1954
                ut_print_timestamp(stderr);
 
1955
                fprintf(stderr,
 
1956
                        "  InnoDB: MySQL has requested a very fast shutdown"
 
1957
                        " without flushing "
 
1958
                        "the InnoDB buffer pool to data files."
 
1959
                        " At the next mysqld startup "
 
1960
                        "InnoDB will do a crash recovery!\n");
1863
1961
        }
1864
1962
 
1865
1963
        logs_empty_and_mark_files_at_shutdown();
1866
1964
 
1867
1965
        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);
 
1966
                fprintf(stderr,
 
1967
                        "InnoDB: Warning: query counter shows %ld queries"
 
1968
                        " still\n"
 
1969
                        "InnoDB: inside InnoDB at shutdown\n",
 
1970
                        srv_conc_n_threads);
1871
1971
        }
1872
1972
 
1873
1973
        /* 2. Make all threads created by InnoDB to exit */
1930
2030
        }
1931
2031
 
1932
2032
        if (i == 1000) {
1933
 
          drizzled::errmsg_printf(drizzled::error::WARN,
1934
 
                        "InnoDB: Warning: %lu threads created by InnoDB had not exited at shutdown!",
 
2033
                fprintf(stderr,
 
2034
                        "InnoDB: Warning: %lu threads created by InnoDB"
 
2035
                        " had not exited at shutdown!\n",
1935
2036
                        (ulong) os_thread_count);
1936
2037
        }
1937
2038
 
1997
2098
            || os_event_count != 0
1998
2099
            || os_mutex_count != 0
1999
2100
            || 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);
 
2101
                fprintf(stderr,
 
2102
                        "InnoDB: Warning: some resources were not"
 
2103
                        " cleaned up in shutdown:\n"
 
2104
                        "InnoDB: threads %lu, events %lu,"
 
2105
                        " os_mutexes %lu, os_fast_mutexes %lu\n",
 
2106
                        (ulong) os_thread_count, (ulong) os_event_count,
 
2107
                        (ulong) os_mutex_count, (ulong) os_fast_mutex_count);
2005
2108
        }
2006
2109
 
2007
2110
        if (dict_foreign_err_file) {
2012
2115
        }
2013
2116
 
2014
2117
        if (srv_print_verbose_log) {
2015
 
                drizzled::errmsg_printf(drizzled::error::INFO,
2016
 
                                        "InnoDB: Shutdown completed log sequence number %"PRIu64,
2017
 
                                        srv_shutdown_lsn);
 
2118
                ut_print_timestamp(stderr);
 
2119
                fprintf(stderr,
 
2120
                        "  InnoDB: Shutdown completed;"
 
2121
                        " log sequence number %"PRIu64"\n",
 
2122
                        srv_shutdown_lsn);
2018
2123
        }
2019
2124
 
2020
2125
        srv_was_started = FALSE;