Skip to content

Commit eb5bc95

Browse files
Andrzej Religabjornmu
authored andcommitted
BUG 22842324 - X PLUGIN NOT LOADABLE WHEN SERVER BUILT WITH -DWITH_LIBEVENT=SYSTEM
The X plugin did not get linked with proper library in case of -DWITH_LIBEVENT=SYSTEM. Other cmake variable gets set in that case, the fix adds that variable for pluging linking. Reviewed-by: Tor Didriksen <[email protected]> Reviewed-by: Lukasz Kotula <[email protected]> RB: 11955 (cherry picked from commit 6cd04018e317f8b8b3889bcf6a7c294672b8d5f4)
1 parent 4168d2f commit eb5bc95

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

rapid/plugin/x/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ ELSE()
120120
${xplugin_SRC} ${xplugin_PROTOBUF_SRC}
121121
COMPILE_FLAGS "-I${xplugin_PROTOBUF_DIR}")
122122

123-
TARGET_LINK_LIBRARIES(xplugin ${LIBEVENT_LIBRARY})
123+
TARGET_LINK_LIBRARIES(xplugin ${LIBEVENT_LIBRARY} ${LIBEVENT_LIBRARIES})
124124

125125
# These are built *with* -DMYSQL_DYNAMIC_PLUGIN
126126
MYSQL_ADD_PLUGIN(mysqlx
@@ -131,7 +131,10 @@ ELSE()
131131

132132
RESTRICT_SYMBOL_SOURCE("${MYSQLX_PROJECT_DIR}/ngs/src/mysql41_hash.cc")
133133

134-
ADD_DEPENDENCIES(xplugin GenError event)
134+
ADD_DEPENDENCIES(xplugin GenError)
135+
IF (WITH_LIBEVENT STREQUAL "bundled")
136+
ADD_DEPENDENCIES(xplugin ${LIBEVENT_LIBRARY})
137+
ENDIF()
135138

136139
IF(XPLUGIN_LOG_PROTOBUF)
137140
MESSAGE(STATUS "MYSQLX - Text log of protobuf messages enabled")

rapid/plugin/x/src/statement_builder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Statement_builder
6666
template<typename L, typename Op>
6767
const Builder &put_list(const L &list, Op generate) const
6868
{
69-
if (list.empty())
69+
if (list.size() == 0)
7070
return *this;
7171

7272
typename L::const_iterator p = list.begin();

sql/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,8 @@ IF(NOT WITHOUT_DYNAMIC_PLUGINS)
461461
FOREACH (CORELIB sql binlog slave mysys mysys_ssl dbug regex strings
462462
vio binlogevents_static)
463463
GET_TARGET_PROPERTY(LOC ${CORELIB} LOCATION)
464-
MESSAGE(STATUS "${CORELIB} ${LOC}")
465464
IF (NOT LOC)
466465
GET_TARGET_PROPERTY(LOC ${CORELIB} IMPORTED_LOCATION)
467-
MESSAGE(STATUS "${CORELIB} ${LOC}")
468466
ENDIF()
469467

470468

0 commit comments

Comments
 (0)