Skip to content

Commit

Permalink
Merge branch 'ob-10.1' into 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Buggynours committed Sep 2, 2017
2 parents 6884f56 + c23b832 commit 92c8864
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 28 deletions.
57 changes: 29 additions & 28 deletions storage/connect/CMakeLists.txt
Expand Up @@ -38,7 +38,7 @@ user_connect.h valblk.h value.h xindex.h xobject.h xtable.h)
# Definitions that are shared for all OSes
#
add_definitions( -DMARIADB -DFORCE_INIT_OF_VARS -Dconnect_EXPORTS)
add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT -DPIVOT_SUPPORT -DUSE_TRY )
add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT -DPIVOT_SUPPORT )


#
Expand Down Expand Up @@ -290,33 +290,33 @@ IF(CONNECT_WITH_ZIP)
ENDIF(CONNECT_WITH_ZIP)

#
# MONGO C Driver (CMAKE NOT YET WORKING)
# MONGO C Driver
#

#IF(CONNECT_WITH_MONGO)
# IF(WIN32)
# # Adding some typical places to search in
# SET(PC_MONGO_INCLUDE_DIRS
# C:/mongo-c-driver/include
# D:/mongo-c-driver/include)
# SET(PC_MONGO_LIBRARY_DIRS
# C:/mongo-c-driver/lib
# D:/mongo-c-driver/lib)
# ENDIF(WIN32)
# FIND_PACKAGE(libmongoc 1.7)
# IF (MONGO_FOUND)
# INCLUDE_DIRECTORIES(${MONGO_INCLUDE_DIR})
# SET(MONGO_LIBRARY ${MONGO_LIBRARIES})
# SET(CONNECT_SOURCES ${CONNECT_SOURCES}
# cmgoconn.cpp cmgfam.cpp tabcmg.cpp
# cmgoconn.h cmgfam.h tabcmg.h)
# add_definitions(-DCMGO_SUPPORT)
# IF (NOT JAVA_FOUND AND JNI_FOUND)
# SET(CONNECT_SOURCES ${CONNECT_SOURCES} mongo.cpp mongo.h)
# add_definitions(-DMONGO_SUPPORT)
# ENDIF (NOT JAVA_FOUND AND JNI_FOUND)
# ENDIF(MONGO_FOUND)
#ENDIF(CONNECT_WITH_MONGO)
IF(CONNECT_WITH_MONGO)
IF(WIN32)
# Adding some typical places to search in
SET(PC_MONGO_INCLUDE_DIRS
C:/mongo-c-driver/include
D:/mongo-c-driver/include)
SET(PC_MONGO_LIBRARY_DIRS
C:/mongo-c-driver/lib
D:/mongo-c-driver/lib)
ENDIF(WIN32)
FIND_PACKAGE(libmongoc-1.0 1.7)
IF (libmongoc-1.0_FOUND)
INCLUDE_DIRECTORIES(${MONGOC_INCLUDE_DIRS})
SET(MONGOC_LIBRARY ${MONGOC_LIBRARIES})
SET(CONNECT_SOURCES ${CONNECT_SOURCES}
cmgoconn.cpp cmgfam.cpp tabcmg.cpp
cmgoconn.h cmgfam.h tabcmg.h)
add_definitions(-DCMGO_SUPPORT)
IF (NOT JAVA_FOUND AND JNI_FOUND)
SET(CONNECT_SOURCES ${CONNECT_SOURCES} mongo.cpp mongo.h)
add_definitions(-DMONGO_SUPPORT)
ENDIF (NOT JAVA_FOUND AND JNI_FOUND)
ENDIF(libmongoc-1.0_FOUND)
ENDIF(CONNECT_WITH_MONGO)


#
Expand All @@ -337,9 +337,8 @@ MYSQL_ADD_PLUGIN(connect ${CONNECT_SOURCES}
STORAGE_ENGINE
COMPONENT connect-engine
RECOMPILE_FOR_EMBEDDED
# LINK_LIBRARIES ${ZLIB_LIBRARY} ${XML_LIBRARY} ${ICONV_LIBRARY} $(MONGO_LIBRARY)
LINK_LIBRARIES ${ZLIB_LIBRARY} ${XML_LIBRARY} ${ICONV_LIBRARY}
${ODBC_LIBRARY} ${JDBC_LIBRARY} ${IPHLPAPI_LIBRARY})
${ODBC_LIBRARY} ${JDBC_LIBRARY} ${MONGOC_LIBRARY} ${IPHLPAPI_LIBRARY})

IF(NOT TARGET connect)
RETURN()
Expand Down Expand Up @@ -369,3 +368,5 @@ IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND)
DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
ENDIF()



4 changes: 4 additions & 0 deletions storage/connect/mysql-test/connect/r/tbl_thread.result
Expand Up @@ -79,6 +79,7 @@ a b
CREATE TABLE total (a int, b char(10))
ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2,t3,t4,t5'
OPTION_LIST='thread=yes,port=PORT';
set connect_xtrace=1;
SELECT * FROM total order by a desc;
a b
19 test19
Expand All @@ -101,6 +102,7 @@ a b
2 test02
1 test01
0 test00
set connect_xtrace=0;
DROP TABLE rt2;
DROP TABLE rt3,rt4,rt5;
DROP TABLE t1,t2,t3,t4,t5,total;
Expand All @@ -116,10 +118,12 @@ SELECT * FROM t2;
v
22
CREATE TABLE total (v BIGINT(20) UNSIGNED NOT NULL) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2' OPTION_LIST='thread=yes,port=PORT';;
set connect_xtrace=1;
SELECT * FROM total order by v desc;
v
22
11
set connect_xtrace=0;
DROP TABLE t1,t2,total;
#
# Old thread TBL tables test not modified (suppressed until MDEV-10179 is fixed)
Expand Down
4 changes: 4 additions & 0 deletions storage/connect/mysql-test/connect/t/tbl_thread.test
Expand Up @@ -56,7 +56,9 @@ SELECT * FROM t5;
eval CREATE TABLE total (a int, b char(10))
ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2,t3,t4,t5'
OPTION_LIST='thread=yes,port=$PORT';
set connect_xtrace=1;
SELECT * FROM total order by a desc;
set connect_xtrace=0;

connection master;

Expand All @@ -83,7 +85,9 @@ SELECT * FROM t2;

--replace_result $PORT PORT
--eval CREATE TABLE total (v BIGINT(20) UNSIGNED NOT NULL) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2' OPTION_LIST='thread=yes,port=$PORT';
set connect_xtrace=1;
SELECT * FROM total order by v desc;
set connect_xtrace=0;
DROP TABLE t1,t2,total;

--echo #
Expand Down

0 comments on commit 92c8864

Please sign in to comment.