diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-01-25 23:12:35 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-01-27 18:54:12 +0100 |
commit | 2175bfce3e9da8332f10ab0e0286dc93915533a2 (patch) | |
tree | b45ab5e6be1ed5619c229202db5139d69b3cbc23 /CMakeLists.txt | |
parent | 21f9037186f8a4bfb45486b9c28dd146e9df0e00 (diff) | |
download | mariadb-git-2175bfce3e9da8332f10ab0e0286dc93915533a2.tar.gz |
Crude "auto-load-data-local-infile" modemariadb-5.5.63
Disable LOAD DATA LOCAL INFILE suport by default and
auto-enable it for the duration of one query, if the query
string starts with the word "load". In all other cases the application
should enable LOAD DATA LOCAL INFILE support explicitly.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b15512683fa..bc4c4e4f103 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -256,9 +256,15 @@ IF(HAVE_GGDB3) SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3") ENDIF() -OPTION(ENABLED_LOCAL_INFILE - "If we should should enable LOAD DATA LOCAL by default" ${IF_WIN}) +SET(ENABLED_LOCAL_INFILE "AUTO" CACHE STRING "If we should should enable LOAD DATA LOCAL by default (OFF/ON/AUTO)") MARK_AS_ADVANCED(ENABLED_LOCAL_INFILE) +IF (ENABLED_LOCAL_INFILE MATCHES "^(0|FALSE)$") + SET(ENABLED_LOCAL_INFILE OFF) +ELSEIF(ENABLED_LOCAL_INFILE MATCHES "^(1|TRUE)$") + SET(ENABLED_LOCAL_INFILE ON) +ELSEIF (NOT ENABLED_LOCAL_INFILE MATCHES "^(ON|OFF|AUTO)$") + MESSAGE(FATAL_ERROR "ENABLED_LOCAL_INFILE must be one of OFF, ON, AUTO") +ENDIF() OPTION(WITH_FAST_MUTEXES "Compile with fast mutexes" OFF) MARK_AS_ADVANCED(WITH_FAST_MUTEXES) |