Commit 3d60f05f authored by Sergey Petrunya's avatar Sergey Petrunya

MySQL 5.1 -> Maria 5.1 merge: Fix windows build

- Fix XtraDB to be built as a static library.

storage/xtradb/buf/buf0flu.c:
  Fix previous merge error (was harmless except for on win32)
storage/xtradb/plug.in:
  Make it sync with innobase/plug.in.disabled
parent e8d7e27f
......@@ -225,6 +225,14 @@ FOREACH(SUBDIR ${STORAGE_SUBDIRS})
STRING (REGEX MATCH "MYSQL_PLUGIN_DYNAMIC" MYSQL_PLUGIN_DYNAMIC ${PLUGIN_FILE_CONTENT})
STRING (REGEX MATCH "MYSQL_PLUGIN_MANDATORY" MYSQL_PLUGIN_MANDATORY ${PLUGIN_FILE_CONTENT})
STRING (REGEX MATCH "MYSQL_PLUGIN_STATIC" MYSQL_PLUGIN_STATIC ${PLUGIN_FILE_CONTENT})
#
# XTRADB is located in storage/xtradb, but it says everywhere it is 'innobase' (e.g.
# it declares 'builtin_innobase_plugin', not builtin_xtradb_plugin).
# Extract the intended plugin name from MYSQL_STORAGE_ENGINE definition and use it
# where appropriate.
STRING (REGEX MATCH "MYSQL_STORAGE_ENGINE.[a-z]*" PLUGIN_NAME ${PLUGIN_FILE_CONTENT})
STRING (REGEX REPLACE "MYSQL_STORAGE_ENGINE.(.*)" "\\1" PLUGIN_NAME ${PLUGIN_NAME})
IF(MYSQL_PLUGIN_MANDATORY)
SET(WITH_${ENGINE}_STORAGE_ENGINE TRUE)
......@@ -238,8 +246,8 @@ FOREACH(SUBDIR ${STORAGE_SUBDIRS})
SET(ENGINE_BUILD_TYPE "NONE")
ENDIF(WITH_${ENGINE}_STORAGE_ENGINE AND MYSQL_PLUGIN_STATIC)
IF (ENGINE_BUILD_TYPE STREQUAL "STATIC")
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_${ENGINE_LOWER}_plugin")
SET (MYSQLD_STATIC_ENGINE_LIBS ${MYSQLD_STATIC_ENGINE_LIBS} ${ENGINE_LOWER})
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_${PLUGIN_NAME}_plugin")
SET (MYSQLD_STATIC_ENGINE_LIBS ${MYSQLD_STATIC_ENGINE_LIBS} ${PLUGIN_NAME})
SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_${ENGINE}_STORAGE_ENGINE")
SET (WITH_${ENGINE}_STORAGE_ENGINE TRUE)
ENDIF (ENGINE_BUILD_TYPE STREQUAL "STATIC")
......
......@@ -1107,6 +1107,8 @@ retry_lock_1:
mutex_exit(block_mutex);
if (ready) {
mutex_t* block_mutex;
buf_page_t* bpage_tmp;
space = buf_page_get_space(bpage);
offset = buf_page_get_page_no(bpage);
......@@ -1120,10 +1122,8 @@ retry_lock_1:
/* Try to flush also all the neighbors */
page_count += buf_flush_try_neighbors(
space, offset, flush_type, srv_flush_neighbor_pages);
mutex_t* block_mutex;
buf_page_t* bpage_tmp;
block_mutex = buf_page_get_mutex(bpage);
bpage_tmp = buf_page_hash_get(space, offset);
block_mutex = buf_page_get_mutex(bpage);
bpage_tmp = buf_page_hash_get(space, offset);
/* fprintf(stderr,
"Flush type %lu, page no %lu, neighb %lu\n",
flush_type, offset,
......
......@@ -20,7 +20,9 @@ MYSQL_PLUGIN_DIRECTORY(innobase, [storage/xtradb])
MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a])
MYSQL_PLUGIN_DYNAMIC(innobase, [ha_innodb.la])
MYSQL_PLUGIN_ACTIONS(innobase, [
AC_CHECK_HEADERS(sched.h)
AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
AC_SUBST(innodb_system_libs)
AC_CHECK_HEADERS(aio.h sched.h)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(void*, 4)
......
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