summaryrefslogtreecommitdiff
path: root/mysys/my_init.c
diff options
context:
space:
mode:
authorunknown <miguel@hegel.br>2002-10-16 21:51:03 -0200
committerunknown <miguel@hegel.br>2002-10-16 21:51:03 -0200
commit2e6dff75ad0ae9ef8fc6664f4b4d78c90b3fe199 (patch)
treec02a595ff949f725ab6f96f5305d88a7e48dc746 /mysys/my_init.c
parent74b73109c1304e62430faa85d2a63a6f2ffa626d (diff)
downloadmariadb-git-2e6dff75ad0ae9ef8fc6664f4b4d78c90b3fe199.tar.gz
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
Diffstat (limited to 'mysys/my_init.c')
-rw-r--r--mysys/my_init.c4
1 files changed, 4 insertions, 0 deletions
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)