summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2014-10-08 21:54:35 +0530
committerVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2014-10-08 21:54:35 +0530
commita3cc647dbdbdeb0f2e9c9ac55ffe062c659d82dc (patch)
tree05ded92647b28f5e59f363fc4e2d255844e25b9d /cmake
parent0d0c59ff8092e0added553e48d271628574a32c4 (diff)
downloadmariadb-git-a3cc647dbdbdeb0f2e9c9ac55ffe062c659d82dc.tar.gz
Bug #18808072 MYSQLBINLOG USES LOCALTIME() TO PRINT EVENTS, CAUSES KERNEL MUTEX CONTENTION
Problem: For every event read, mysqlbinlog calls localtime() which in turn calls stat(/etc/localtime) which is causing kernel mutex contention. Analysis and Fix: localtime() calls stat(/etc/localtime) for every instance of the call where as localtime_r() the reentrant version was optimized to store the read only tz internal structure. Hence it will not call stat(/etc/localtime). It will call only once at the beginning. The mysql server is calling localtime_r() and mysqlbinlog tool is one place where we are still using localtime(). Once the process (mysqlbinlog) is started if timezone is changed it will be not picked up the the process and it will continue with the same values as the beginning of the process. This behavior is in-lined with mysql server. Also adding localtime_r() and gmtime_r() support for windows.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/os/WindowsCache.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake
index 897012896c8..bbed14556b9 100644
--- a/cmake/os/WindowsCache.cmake
+++ b/cmake/os/WindowsCache.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -88,7 +88,7 @@ SET(HAVE_GETRLIMIT CACHE INTERNAL "")
SET(HAVE_GETRUSAGE CACHE INTERNAL "")
SET(HAVE_GETTIMEOFDAY CACHE INTERNAL "")
SET(HAVE_GETWD CACHE INTERNAL "")
-SET(HAVE_GMTIME_R CACHE INTERNAL "")
+SET(HAVE_GMTIME_R 1 CACHE INTERNAL "")
SET(HAVE_GRP_H CACHE INTERNAL "")
SET(HAVE_IA64INTRIN_H CACHE INTERNAL "")
SET(HAVE_IEEEFP_H CACHE INTERNAL "")
@@ -109,7 +109,7 @@ SET(HAVE_LANGINFO_H CACHE INTERNAL "")
SET(HAVE_LDIV 1 CACHE INTERNAL "")
SET(HAVE_LIMITS_H 1 CACHE INTERNAL "")
SET(HAVE_LOCALE_H 1 CACHE INTERNAL "")
-SET(HAVE_LOCALTIME_R CACHE INTERNAL "")
+SET(HAVE_LOCALTIME_R 1 CACHE INTERNAL "")
SET(HAVE_LOG2 CACHE INTERNAL "")
SET(HAVE_LONGJMP 1 CACHE INTERNAL "")
SET(HAVE_LRAND48 CACHE INTERNAL "")