summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2012-02-27 19:20:18 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2012-02-27 19:20:18 +0100
commit3ebb4b883370da9528b7482b8ba4ed9521f07553 (patch)
tree317df6a325229e869ab1e5d3bc9d08f374d89cde
parentf0c682858f26efcebabb558068aa567eed44632e (diff)
downloadmariadb-git-3ebb4b883370da9528b7482b8ba4ed9521f07553.tar.gz
because of the high cost associated with fake symdir resolution, disable symbolic-links on Windows by default. Real symlinks (Vista+) as well as NTFS junctions (prior to Vista) do not require this parameter
-rw-r--r--cmake/ssl.cmake2
-rw-r--r--mysys/my_access.c16
-rw-r--r--sql/mysqld.cc4
3 files changed, 10 insertions, 12 deletions
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
index 001be69e62f..b5b94310d29 100644
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -69,8 +69,10 @@ MACRO (MYSQL_CHECK_SSL)
FIND_LIBRARY(CRYPTO_LIBRARY crypto)
MARK_AS_ADVANCED(CRYPTO_LIBRARY)
INCLUDE(CheckSymbolExists)
+ SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
HAVE_SHA512_DIGEST_LENGTH)
+ SET(CMAKE_REQUIRED_INCLUDES)
IF(OPENSSL_FOUND AND CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH)
SET(SSL_SOURCES "")
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY})
diff --git a/mysys/my_access.c b/mysys/my_access.c
index 210946d50a8..d7d06f814d6 100644
--- a/mysys/my_access.c
+++ b/mysys/my_access.c
@@ -26,11 +26,6 @@
path Path to file
amode Access method
- DESCRIPTION
- This function wraps the normal access method because the access
- available in MSVCRT> +reports that filenames such as LPT1 and
- COM1 are valid (they are but should not be so for us).
-
RETURN VALUES
0 ok
-1 error (We use -1 as my_access is mapped to access on other platforms)
@@ -38,12 +33,11 @@
int my_access(const char *path, int amode)
{
- WIN32_FILE_ATTRIBUTE_DATA fileinfo;
- BOOL result;
-
- result= GetFileAttributesEx(path, GetFileExInfoStandard, &fileinfo);
- if (! result ||
- (fileinfo.dwFileAttributes & FILE_ATTRIBUTE_READONLY) && (amode & W_OK))
+ DWORD attributes;
+
+ attributes = GetFileAttributes(path);
+ if (attributes == INVALID_FILE_ATTRIBUTES ||
+ (attributes & FILE_ATTRIBUTE_READONLY) && (amode & W_OK))
{
my_errno= errno= EACCES;
return -1;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 6a5de0b82cb..a5b0c462a63 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -6334,8 +6334,10 @@ struct my_option my_long_options[]=
The system call realpath() produces warnings under valgrind and
purify. These are not suppressed: instead we disable symlinks
option if compiled with valgrind support.
+ Also disable by default on Windows, due to high overhead for checking .sym
+ files.
*/
- IF_VALGRIND(0,1), 0, 0, 0, 0, 0},
+ IF_VALGRIND(0,IF_WIN(0,1)), 0, 0, 0, 0, 0},
{"debug-no-sync", 0,
"Disables system sync calls. Only for running tests or debugging!",
&my_disable_sync, &my_disable_sync, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},