Commit d16474df authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

because of the high cost associated with fake symdir resolution, disable...

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
parent 304780f8
...@@ -69,8 +69,10 @@ MACRO (MYSQL_CHECK_SSL) ...@@ -69,8 +69,10 @@ MACRO (MYSQL_CHECK_SSL)
FIND_LIBRARY(CRYPTO_LIBRARY crypto) FIND_LIBRARY(CRYPTO_LIBRARY crypto)
MARK_AS_ADVANCED(CRYPTO_LIBRARY) MARK_AS_ADVANCED(CRYPTO_LIBRARY)
INCLUDE(CheckSymbolExists) INCLUDE(CheckSymbolExists)
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h" CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
HAVE_SHA512_DIGEST_LENGTH) HAVE_SHA512_DIGEST_LENGTH)
SET(CMAKE_REQUIRED_INCLUDES)
IF(OPENSSL_FOUND AND CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH) IF(OPENSSL_FOUND AND CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH)
SET(SSL_SOURCES "") SET(SSL_SOURCES "")
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY}) SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY})
......
...@@ -26,11 +26,6 @@ ...@@ -26,11 +26,6 @@
path Path to file path Path to file
amode Access method 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 RETURN VALUES
0 ok 0 ok
-1 error (We use -1 as my_access is mapped to access on other platforms) -1 error (We use -1 as my_access is mapped to access on other platforms)
...@@ -38,12 +33,11 @@ ...@@ -38,12 +33,11 @@
int my_access(const char *path, int amode) int my_access(const char *path, int amode)
{ {
WIN32_FILE_ATTRIBUTE_DATA fileinfo; DWORD attributes;
BOOL result;
attributes = GetFileAttributes(path);
result= GetFileAttributesEx(path, GetFileExInfoStandard, &fileinfo); if (attributes == INVALID_FILE_ATTRIBUTES ||
if (! result || (attributes & FILE_ATTRIBUTE_READONLY) && (amode & W_OK))
(fileinfo.dwFileAttributes & FILE_ATTRIBUTE_READONLY) && (amode & W_OK))
{ {
my_errno= errno= EACCES; my_errno= errno= EACCES;
return -1; return -1;
......
...@@ -6334,8 +6334,10 @@ struct my_option my_long_options[]= ...@@ -6334,8 +6334,10 @@ struct my_option my_long_options[]=
The system call realpath() produces warnings under valgrind and The system call realpath() produces warnings under valgrind and
purify. These are not suppressed: instead we disable symlinks purify. These are not suppressed: instead we disable symlinks
option if compiled with valgrind support. 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, {"debug-no-sync", 0,
"Disables system sync calls. Only for running tests or debugging!", "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}, &my_disable_sync, &my_disable_sync, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment