From 2e6dff75ad0ae9ef8fc6664f4b4d78c90b3fe199 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 16 Oct 2002 21:51:03 -0200 Subject: Added optional NT service and fix the TZ variable bug mysys/my_init.c: Fix the TZ variable bug: 100% CPU usage sql/mysqld.cc: Added optional NT service sql/nt_servc.cc: Added optional NT service sql/nt_servc.h: Added optional NT service --- mysys/my_init.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysys') diff --git a/mysys/my_init.c b/mysys/my_init.c index 31e49731c94..6a0e2444a62 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -219,6 +219,10 @@ static void my_win_init(void) setlocale(LC_CTYPE, ""); /* To get right sortorder */ + /* Clear the OS system variable TZ and avoid the 100% CPU usage */ + _putenv( "TZ=" ); + _tzset(); + /* apre la chiave HKEY_LOCAL_MACHINES\software\MySQL */ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,(LPCTSTR)targetKey,0, KEY_READ,&hSoftMysql) != ERROR_SUCCESS) -- cgit v1.2.1 From c771f85e6c8b18a8e8fbeb4dd94fd11641728809 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 20 Oct 2002 09:01:15 +0300 Subject: Fixed usage of putenv() on windows (in not normally used code) --- mysys/my_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysys') diff --git a/mysys/my_init.c b/mysys/my_init.c index 31e49731c94..3a1935d4267 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -242,7 +242,7 @@ static void my_win_init(void) /* Inserisce i dati come variabili d'ambiente */ my_env=strdup(EnvString); /* variable for putenv must be allocated ! */ - putenv(EnvString) ; + putenv(my_env) ; dimNameValueBuffer = dimName ; dimDataValueBuffer = dimData ; -- cgit v1.2.1