diff options
Diffstat (limited to 'mysys/my_init.c')
-rw-r--r-- | mysys/my_init.c | 53 |
1 files changed, 3 insertions, 50 deletions
diff --git a/mysys/my_init.c b/mysys/my_init.c index 23567947adb..89ac2f322cf 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -106,6 +106,7 @@ my_bool my_init(void) DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown")); if (!home_dir) { /* Don't initialize twice */ + my_time_init(); my_win_init(); if ((home_dir=getenv("HOME")) != 0) home_dir=intern_filename(home_dir_buff,home_dir); @@ -262,7 +263,6 @@ void my_debug_put_break_here(void) #ifdef __WIN__ - /* my_parameter_handler @@ -278,6 +278,7 @@ void my_parameter_handler(const wchar_t * expression, const wchar_t * function, { DBUG_PRINT("my",("Expression: %s function: %s file: %s, line: %d", expression, function, file, line)); + __debugbreak(); } @@ -302,7 +303,7 @@ int handle_rtc_failure(int err_type, const char *file, int line, fprintf(stderr, " At %s:%d\n", file, line); va_end(args); (void) fflush(stderr); - + __debugbreak(); return 0; /* Error is handled */ } #pragma runtime_checks("", restore) @@ -336,54 +337,6 @@ static void my_win_init(void) _tzset(); - - - - - - - - - - - - - - - - - - - - - - - - - /* The following is used by time functions */ -#define OFFSET_TO_EPOC ((__int64) 134774 * 24 * 60 * 60 * 1000 * 1000 * 10) -#define MS 10000000 - { - FILETIME ft; - LARGE_INTEGER li, t_cnt; - DBUG_ASSERT(sizeof(LARGE_INTEGER) == sizeof(query_performance_frequency)); - if (QueryPerformanceFrequency((LARGE_INTEGER *)&query_performance_frequency) == 0) - query_performance_frequency= 0; - else - { - GetSystemTimeAsFileTime(&ft); - li.LowPart= ft.dwLowDateTime; - li.HighPart= ft.dwHighDateTime; - query_performance_offset= li.QuadPart-OFFSET_TO_EPOC; - QueryPerformanceCounter(&t_cnt); - query_performance_offset-= (t_cnt.QuadPart / - query_performance_frequency * MS + - t_cnt.QuadPart % - query_performance_frequency * MS / - query_performance_frequency); - } - } - { /* Open HKEY_LOCAL_MACHINE\SOFTWARE\MySQL and set any strings found |