summaryrefslogtreecommitdiff
path: root/mysys/my_init.c
diff options
context:
space:
mode:
authorunknown <miguel@hegel.br>2002-10-16 21:22:56 -0200
committerunknown <miguel@hegel.br>2002-10-16 21:22:56 -0200
commite157150cf9e5f627b99c62945d572f9f2fa4aede (patch)
tree3bd2ab4ed78afd76656cf4088a9799b2e488444d /mysys/my_init.c
parent320d4912f4e6318d7ac080692ed780b6f1557e54 (diff)
downloadmariadb-git-e157150cf9e5f627b99c62945d572f9f2fa4aede.tar.gz
Fix the 100% CPU usage with TZ variable
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 f47286159f7..9dd2540ac6c 100644
--- a/mysys/my_init.c
+++ b/mysys/my_init.c
@@ -218,6 +218,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)