summaryrefslogtreecommitdiff
path: root/storage/connect/CMakeLists.txt
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2019-06-27 17:54:28 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2019-06-27 17:54:28 +0200
commitec4795add694349c191b5f2e8d5f1c7e64008441 (patch)
treec87c4ef22400d53f8f2b9f37699484fddf84048a /storage/connect/CMakeLists.txt
parent66197aa0d5f13019065a0460b0645963223da063 (diff)
downloadmariadb-git-ec4795add694349c191b5f2e8d5f1c7e64008441.tar.gz
In CONNECT version 1.6.10 NOSQL facility is enhanced by a new way to retrieve NOSQL data.
In addition to files and Mongo collections, JSON as well as XML and CSV data can be retrieved from the net as answers from REST queries. Because it uses and external package (cpprestsdk) this is currently available only to MariaDB servers compiled from source. -- Add the REST support when Microsoft Casablanca package (cpprestsdk) is installed. -- Also include some changes specific to MariaDB 10.3. modified: storage/connect/CMakeLists.txt -- Add conditional REST support -- Added string options HTTP and URI. -- Added added internal table type TAB_REST. modified: storage/connect/ha_connect.cc modified: storage/connect/mycat.cc modified: storage/connect/mycat.h modified: storage/connect/plgdbsem.h -- Fix MDEV-19648 Variable connect_conv_size doesn't change -- Change Variable wrong block parameter from 8169 to 1. -- Also change connect_conv_size default value to 1024. modified: storage/connect/ha_connect.cc -- Avoid possible buffer overflow -- In particular by the function ShowValue. modified: storage/connect/tabdos.cpp modified: storage/connect/tabfmt.cpp modified: storage/connect/value.cpp modified: storage/connect/value.h -- Add some cast to avoid some compiler warnings modified: storage/connect/filamdbf.cpp -- Fix some C++ error modified: storage/connect/javaconn.cpp modified: storage/connect/jmgoconn.cpp modified: storage/connect/plugutil.cpp -- Miscellaneous Typo and warning suppressing changes modified: storage/connect/connect.cpp modified: storage/connect/connect.h modified: storage/connect/filamvct.cpp modified: storage/connect/inihandl.cpp modified: storage/connect/jsonudf.cpp modified: storage/connect/libdoc.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/tabtbl.cpp modified: storage/connect/tabxml.cpp modified: storage/connect/user_connect.cc modified: storage/connect/user_connect.h -- Update failing test results and disbling modified: storage/connect/mysql-test/connect/disabled.def modified: storage/connect/mysql-test/connect/r/dir.result modified: storage/connect/mysql-test/connect/r/grant.result modified: storage/connect/mysql-test/connect/r/jdbc.result modified: storage/connect/mysql-test/connect/r/jdbc_postgresql.result modified: storage/connect/mysql-test/connect/r/xml.result modified: storage/connect/mysql-test/connect/r/xml2.result modified: storage/connect/mysql-test/connect/r/xml2_mult.result modified: storage/connect/mysql-test/connect/r/xml_mult.result -- Add an option modified: storage/connect/mysql-test/connect/t/grant.test
Diffstat (limited to 'storage/connect/CMakeLists.txt')
-rw-r--r--storage/connect/CMakeLists.txt70
1 files changed, 48 insertions, 22 deletions
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index 782d1f44bdf..153512b994c 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -11,7 +11,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
SET(CONNECT_PLUGIN_STATIC "connect")
SET(CONNECT_PLUGIN_DYNAMIC "connect")
@@ -40,6 +40,10 @@ user_connect.h valblk.h value.h xindex.h xobject.h xtable.h)
add_definitions( -DMARIADB -DFORCE_INIT_OF_VARS -Dconnect_EXPORTS)
add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT )
+macro(DISABLE_WARNING W)
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=${W}")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-${W}" DEBUG)
+endmacro()
#
# OS specific C flags, definitions and source files.
@@ -47,14 +51,15 @@ add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT )
IF(UNIX)
MY_CHECK_AND_SET_COMPILER_FLAG("-Wall -Wmissing-declarations")
if(NOT WITH_WARNINGS)
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-function")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-variable")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-value")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-parentheses")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-strict-aliasing")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-misleading-indentation")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-format-truncation")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough")
+ DISABLE_WARNING("unused-function")
+ DISABLE_WARNING("unused-variable")
+ DISABLE_WARNING("unused-value")
+ DISABLE_WARNING("parentheses")
+ DISABLE_WARNING("strict-aliasing")
+ DISABLE_WARNING("misleading-indentation")
+ DISABLE_WARNING("format-truncation")
+ DISABLE_WARNING("implicit-fallthrough")
+ DISABLE_WARNING("type-limits")
endif(NOT WITH_WARNINGS)
add_definitions( -DUNIX -DLINUX -DUBUNTU )
@@ -113,6 +118,7 @@ IF(CONNECT_WITH_LIBXML2)
FIND_PACKAGE(LibXml2)
IF (LIBXML2_FOUND)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
+ SET(ZLIB_LIBRARY "z") # see ZLIB_INCLUDE_DIR below
SET(XML_LIBRARY ${LIBXML2_LIBRARIES})
SET(CONNECT_SOURCES ${CONNECT_SOURCES} libdoc.cpp libdoc.h)
add_definitions(-DLIBXML2_SUPPORT)
@@ -128,7 +134,6 @@ IF(WIN32)
OPTION(CONNECT_WITH_MSXML "Compile CONNECT storage engine with MSXML support" ON)
IF(CONNECT_WITH_MSXML)
add_definitions(-DMSX6 -DDOMDOC_SUPPORT)
- message(STATUS "MSXML library version: msxml6")
SET(MSXML_FOUND 1)
SET(CONNECT_SOURCES ${CONNECT_SOURCES} domdoc.cpp domdoc.h)
ENDIF(CONNECT_WITH_MSXML)
@@ -168,7 +173,8 @@ IF(CONNECT_WITH_ODBC)
# the library 'libiodbc' gets compiled with 'sql'h.
# This will also need changes in the sources (e.g. #include <isql.h>).
- find_path(ODBC_INCLUDE_DIR sql.h
+ find_file(ODBC_INCLUDES sql.h
+ PATHS
/usr/include
/usr/include/odbc
/usr/local/include
@@ -178,7 +184,7 @@ IF(CONNECT_WITH_ODBC)
#"C:/Program Files/Microsoft SDKs/Windows/v7.0A/include"
#"C:/Program Files/Microsoft SDKs/Windows/v6.0a/include"
#"C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/include"
- DOC "Specify the directory containing sql.h."
+ DOC "Specify the path to sql.h."
)
find_library(ODBC_LIBRARY
@@ -197,9 +203,10 @@ IF(CONNECT_WITH_ODBC)
DOC "Specify the ODBC driver manager library here."
)
- mark_as_advanced(ODBC_LIBRARY ODBC_INCLUDE_DIR)
+ mark_as_advanced(ODBC_LIBRARY ODBC_INCLUDES)
- IF(ODBC_INCLUDE_DIR AND ODBC_LIBRARY)
+ IF(ODBC_INCLUDES AND ODBC_LIBRARY)
+ get_filename_component(ODBC_INCLUDE_DIR "${ODBC_INCLUDES}" PATH)
set(CMAKE_REQUIRED_LIBRARIES ${ODBC_LIBRARY})
set(CMAKE_REQUIRED_INCLUDES ${ODBC_INCLUDE_DIR})
CHECK_CXX_SOURCE_COMPILES(
@@ -306,6 +313,24 @@ ENDIF(CONNECT_WITH_MONGO)
#
+# REST
+#
+
+#OPTION(CONNECT_WITH_REST "Compile CONNECT storage engine with REST support" ON)
+
+IF(CONNECT_WITH_REST)
+ MESSAGE(STATUS "=====> REST support is ON")
+ FIND_PACKAGE(cpprestsdk)
+ IF (cpprestsdk_FOUND)
+ MESSAGE(STATUS "=====> cpprestsdk found")
+ SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabrest.cpp restget.cpp tabrest.h)
+ add_definitions(-DREST_SUPPORT)
+ ELSE(NOT cpprestsdk_FOUND)
+ MESSAGE(STATUS "=====> cpprestsdk package not found")
+ ENDIF (cpprestsdk_FOUND)
+ENDIF(CONNECT_WITH_ZIP)
+
+#
# XMAP
#
@@ -330,6 +355,14 @@ IF(NOT TARGET connect)
RETURN()
ENDIF()
+# Don't link with bundled zlib and systel libxml2 at the same time.
+# System libxml2 uses system zlib, might conflict with the bundled one.
+IF (XML_LIBRARY AND BUILD_BUNDLED_ZLIB)
+ GET_PROPERTY(INCS TARGET connect PROPERTY INCLUDE_DIRECTORIES)
+ LIST(REMOVE_ITEM INCS ${ZLIB_INCLUDE_DIR})
+ SET_PROPERTY(TARGET connect PROPERTY INCLUDE_DIRECTORIES ${INCS})
+ENDIF()
+
IF(WIN32)
IF (libmongoc-1.0_FOUND)
SET_TARGET_PROPERTIES(connect PROPERTIES LINK_FLAGS
@@ -338,14 +371,7 @@ IF(WIN32)
# Install some extra files that belong to connect engine
- # install ha_connect.lib
- GET_TARGET_PROPERTY(CONNECT_LOCATION connect LOCATION)
- STRING(REPLACE "dll" "lib" CONNECT_LIB ${CONNECT_LOCATION})
- IF(CMAKE_CONFIGURATION_TYPES)
- STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
- CONNECT_LIB ${CONNECT_LIB})
- ENDIF()
- INSTALL(FILES ${CONNECT_LIB}
+ INSTALL(FILES "$<TARGET_FILE_DIR:connect>/ha_connect.lib"
DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
ENDIF(WIN32)