Commit 0fbc74a4 authored by Marko Mäkelä's avatar Marko Mäkelä

Bug #57730 Clean up references to InnoDB Plugin

CMakeLists.txt: Remove the checks for mysql_storage_engine.cmake
and MYSQL_VERSION_ID.

ha_innodb.cc, ha_innodb.h: Remove the checks for MYSQL_VERSION_ID.
parent 431e3ee7
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# along with this program; if not, write to the Free Software # 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-1301 USA
# This is the CMakeLists for InnoDB Plugin # This is the CMakeLists for InnoDB
INCLUDE(CheckFunctionExists) INCLUDE(CheckFunctionExists)
INCLUDE(CheckCSourceCompiles) INCLUDE(CheckCSourceCompiles)
...@@ -254,29 +254,7 @@ IF(WITH_INNODB) ...@@ -254,29 +254,7 @@ IF(WITH_INNODB)
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE) SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
ENDIF() ENDIF()
MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE
#The plugin's CMakeLists.txt still needs to work with previous versions of MySQL. DEFAULT
IF(EXISTS ${SOURCE_DIR}/storage/mysql_storage_engine.cmake) MODULE_OUTPUT_NAME ha_innodb
# Old plugin support on Windows only, LINK_LIBRARIES ${ZLIB_LIBRARY})
# use tricks to force ha_innodb.dll name for DLL
INCLUDE(${SOURCE_DIR}/storage/mysql_storage_engine.cmake)
MYSQL_STORAGE_ENGINE(INNOBASE)
GET_TARGET_PROPERTY(LIB_LOCATION ha_innobase LOCATION)
IF(LIB_LOCATION)
SET_TARGET_PROPERTIES(ha_innobase PROPERTIES OUTPUT_NAME ha_innodb)
ENDIF()
ELSEIF (MYSQL_VERSION_ID LESS "50137")
# Windows only, no plugin support
IF (NOT SOURCE_SUBLIBS)
ADD_DEFINITIONS(-DMYSQL_SERVER)
ADD_LIBRARY(innobase STATIC ${INNOBASE_SOURCES})
# Require mysqld_error.h, which is built as part of the GenError
ADD_DEPENDENCIES(innobase GenError)
ENDIF()
ELSE()
# New plugin support, cross-platform , base name for shared module is "ha_innodb"
MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE
DEFAULT
MODULE_OUTPUT_NAME ha_innodb
LINK_LIBRARIES ${ZLIB_LIBRARY})
ENDIF()
...@@ -95,10 +95,6 @@ extern "C" { ...@@ -95,10 +95,6 @@ extern "C" {
# define MYSQL_PLUGIN_IMPORT /* nothing */ # define MYSQL_PLUGIN_IMPORT /* nothing */
# endif /* MYSQL_PLUGIN_IMPORT */ # endif /* MYSQL_PLUGIN_IMPORT */
#if MYSQL_VERSION_ID < 50124
bool check_global_access(THD *thd, ulong want_access);
#endif /* MYSQL_VERSION_ID < 50124 */
/** to protect innobase_open_files */ /** to protect innobase_open_files */
static mysql_mutex_t innobase_share_mutex; static mysql_mutex_t innobase_share_mutex;
/** to force correct commit order in binlog */ /** to force correct commit order in binlog */
...@@ -1885,11 +1881,7 @@ innobase_convert_identifier( ...@@ -1885,11 +1881,7 @@ innobase_convert_identifier(
FALSE=id is an UTF-8 string */ FALSE=id is an UTF-8 string */
{ {
char nz[NAME_LEN + 1]; char nz[NAME_LEN + 1];
#if MYSQL_VERSION_ID >= 50141
char nz2[NAME_LEN + 1 + EXPLAIN_FILENAME_MAX_EXTRA_LENGTH]; char nz2[NAME_LEN + 1 + EXPLAIN_FILENAME_MAX_EXTRA_LENGTH];
#else /* MYSQL_VERSION_ID >= 50141 */
char nz2[NAME_LEN + 1 + sizeof srv_mysql50_table_name_prefix];
#endif /* MYSQL_VERSION_ID >= 50141 */
const char* s = id; const char* s = id;
int q; int q;
...@@ -1907,13 +1899,9 @@ innobase_convert_identifier( ...@@ -1907,13 +1899,9 @@ innobase_convert_identifier(
nz[idlen] = 0; nz[idlen] = 0;
s = nz2; s = nz2;
#if MYSQL_VERSION_ID >= 50141
idlen = explain_filename((THD*) thd, nz, nz2, sizeof nz2, idlen = explain_filename((THD*) thd, nz, nz2, sizeof nz2,
EXPLAIN_PARTITIONS_AS_COMMENT); EXPLAIN_PARTITIONS_AS_COMMENT);
goto no_quote; goto no_quote;
#else /* MYSQL_VERSION_ID >= 50141 */
idlen = filename_to_tablename(nz, nz2, sizeof nz2);
#endif /* MYSQL_VERSION_ID >= 50141 */
} }
/* See if the identifier needs to be quoted. */ /* See if the identifier needs to be quoted. */
...@@ -1924,9 +1912,7 @@ innobase_convert_identifier( ...@@ -1924,9 +1912,7 @@ innobase_convert_identifier(
} }
if (q == EOF) { if (q == EOF) {
#if MYSQL_VERSION_ID >= 50141
no_quote: no_quote:
#endif /* MYSQL_VERSION_ID >= 50141 */
if (UNIV_UNLIKELY(idlen > buflen)) { if (UNIV_UNLIKELY(idlen > buflen)) {
idlen = buflen; idlen = buflen;
} }
......
...@@ -276,14 +276,13 @@ int thd_binlog_format(const MYSQL_THD thd); ...@@ -276,14 +276,13 @@ int thd_binlog_format(const MYSQL_THD thd);
*/ */
void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all); void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all);
#if MYSQL_VERSION_ID > 50140
/** /**
Check if binary logging is filtered for thread's current db. Check if binary logging is filtered for thread's current db.
@param thd Thread handle @param thd Thread handle
@retval 1 the query is not filtered, 0 otherwise. @retval 1 the query is not filtered, 0 otherwise.
*/ */
bool thd_binlog_filter_ok(const MYSQL_THD thd); bool thd_binlog_filter_ok(const MYSQL_THD thd);
#endif /* MYSQL_VERSION_ID > 50140 */
/** /**
Check if the query may generate row changes which Check if the query may generate row changes which
may end up in the binary. may end up in the binary.
......
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