Commit fc7f9316 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Bug #48317 cannot build innodb as static library.

The problem here is that the latest innodb push contains
both MYSQL_STORAGE_ENGINE(INNOBASE) and MYSQL_STORAGE_ENGINE(INNOBASE)
in the same CMakeLists.txt, to make the resulting library
ha_innodb.dll, instead of ha_innobase.dll.

Using multiple MYSQL_STORAGE_ENGINE within the same  CMakeLists.txt
conflicts with the fix for the bug Bug #47795 "CMake, storage engine
name different from directory name". Top-level CMakeLists.txt now 
parses storage engine's  CMakeLists.txt to extract engines name from 
MYSQL_STORAGE_ENGINE().

For innodb, it concludes that there is not storage engine named
INNOBASE, hence WITH_INNOBASE_STORAGE_ENGINE has no effect.

The fix is to use SET_TARGET_PROPERTIES(... PROPERTIES OUTPUT_NAME ...),
instead of renaming the engine to have plugins named ha_innodb.dll.
parent 2e32d0be
...@@ -86,12 +86,12 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c ...@@ -86,12 +86,12 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
ADD_DEFINITIONS(-DHAVE_WINDOWS_ATOMICS -DIB_HAVE_PAUSE_INSTRUCTION) ADD_DEFINITIONS(-DHAVE_WINDOWS_ATOMICS -DIB_HAVE_PAUSE_INSTRUCTION)
IF (MYSQL_VERSION_ID GREATER "50137") IF (MYSQL_VERSION_ID GREATER "50137")
IF (WITH_INNOBASE_STORAGE_ENGINE) MYSQL_STORAGE_ENGINE(INNOBASE)
MYSQL_STORAGE_ENGINE(INNOBASE) # Use ha_innodb for plugin name, if plugin is built
ELSE (WITH_INNOBASE_STORAGE_ENGINE) GET_TARGET_PROPERTY(LIB_LOCATION ha_innobase LOCATION)
SET (INNODB_SOURCES ${INNOBASE_SOURCES}) IF(LIB_LOCATION)
MYSQL_STORAGE_ENGINE(INNODB) SET_TARGET_PROPERTIES(ha_innobase PROPERTIES OUTPUT_NAME ha_innodb)
ENDIF (WITH_INNOBASE_STORAGE_ENGINE) ENDIF(LIB_LOCATION)
ELSE (MYSQL_VERSION_ID GREATER "50137") ELSE (MYSQL_VERSION_ID GREATER "50137")
IF (NOT SOURCE_SUBLIBS) IF (NOT SOURCE_SUBLIBS)
ADD_DEFINITIONS(-D_WIN32 -DMYSQL_SERVER) ADD_DEFINITIONS(-D_WIN32 -DMYSQL_SERVER)
......
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