Commit 14e53d06 authored by Sergei Golubchik's avatar Sergei Golubchik

allow federated and innodb_plugin to be built

storage/federated/Makefile.am:
  federated needs functions from mysys/string.c.
  mysqld does not use them, so they don't get into the binary.
storage/federated/plug.in:
  enable federated again.
  remove it from all configurations.
storage/federatedx/Makefile.am:
  federatedx is now called federatedx in configure
storage/federatedx/ha_federatedx.cc:
  federatedx is now called federatedx in configure
storage/federatedx/plug.in:
  federatedx is now called federatedx in configure
storage/innodb_plugin/plug.in:
  enable innodb plugin again.
  remove it from all configurations.
storage/xtradb/CMakeLists.txt:
  xtradb is now called xtradb in configure,
  and builds libxtradb.a and ha_xtradb.so
storage/xtradb/Makefile.am:
  xtradb is now called xtradb in configure,
  and builds libxtradb.a and ha_xtradb.so
storage/xtradb/handler/ha_innodb.cc:
  xtradb is now called xtradb in configure,
  and builds libxtradb.a and ha_xtradb.so
storage/xtradb/plug.in:
  xtradb is now called xtradb in configure,
  and builds libxtradb.a and ha_xtradb.so
parent c00c1b76
......@@ -26,8 +26,6 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \
-I$(srcdir)
WRAPLIBS=
LDADD =
DEFS = @DEFS@
noinst_HEADERS = ha_federated.h
......@@ -37,7 +35,7 @@ pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@
ha_federated_la_LDFLAGS = -module -rpath $(pkgplugindir)
ha_federated_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_federated_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_federated_la_SOURCES = ha_federated.cc
ha_federated_la_SOURCES = ha_federated.cc $(top_srcdir)/mysys/string.c
EXTRA_LIBRARIES = libfederated.a
......
MYSQL_STORAGE_ENGINE(federated,,[Federated Storage Engine],
[Connects to tables on remote MySQL servers], [max,max-no-ndb])
[Connects to tables on remote MySQL servers], [])
MYSQL_PLUGIN_STATIC(federated, [libfederated.a])
MYSQL_PLUGIN_DYNAMIC(federated, [ha_federated.la])
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(federated, [ha_federated.cc])
......@@ -18,14 +18,14 @@ DEFS = @DEFS@
noinst_HEADERS = ha_federatedx.h federatedx_probes.h
EXTRA_LTLIBRARIES = ha_federatedx.la
pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@
pkgplugin_LTLIBRARIES = @plugin_federatedx_shared_target@
ha_federatedx_la_LDFLAGS = -module -rpath $(pkgplugindir)
ha_federatedx_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_federatedx_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
EXTRA_LIBRARIES = libfederatedx.a
noinst_LIBRARIES = @plugin_federated_static_target@
noinst_LIBRARIES = @plugin_federatedx_static_target@
libfederatedx_a_CXXFLAGS = $(AM_CFLAGS)
libfederatedx_a_CFLAGS = $(AM_CFLAGS)
libfederatedx_a_SOURCES= ha_federatedx.cc federatedx_txn.cc \
......
......@@ -3495,7 +3495,7 @@ int ha_federatedx::rollback(handlerton *hton, MYSQL_THD thd, bool all)
struct st_mysql_storage_engine federatedx_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
mysql_declare_plugin(federated)
mysql_declare_plugin(federatedx)
{
MYSQL_STORAGE_ENGINE_PLUGIN,
&federatedx_storage_engine,
......
MYSQL_STORAGE_ENGINE(federated,,[FederatedX Storage Engine],
MYSQL_STORAGE_ENGINE(federatedx,,[FederatedX Storage Engine],
[FederatedX Storage Engine], [max,max-no-ndb])
MYSQL_PLUGIN_DYNAMIC(federated, [ha_federatedx.la])
MYSQL_PLUGIN_STATIC(federated, [libfederatedx.a])
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(federated, [ha_federatedx.cc])
MYSQL_PLUGIN_DYNAMIC(federatedx, [ha_federatedx.la])
MYSQL_PLUGIN_STATIC(federatedx, [libfederatedx.a])
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(federatedx, [ha_federatedx.cc])
......@@ -15,7 +15,7 @@
#
MYSQL_STORAGE_ENGINE(innodb_plugin,, [InnoDB Storage Engine],
[Transactional Tables using InnoDB], [max,max-no-ndb])
[Transactional Tables using InnoDB], [])
MYSQL_PLUGIN_DIRECTORY(innodb_plugin, [storage/innodb_plugin])
MYSQL_PLUGIN_DYNAMIC(innodb_plugin, [ha_innodb_plugin.la])
MYSQL_PLUGIN_ACTIONS(innodb_plugin, [
......
......@@ -31,7 +31,7 @@ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES 8)
ADD_DEFINITIONS(-D_WIN32 -D_LIB -DMYSQL_SERVER)
# Include directories under innobase
# Include directories under xtradb
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/xtradb/include
${CMAKE_SOURCE_DIR}/storage/xtradb/handler)
......@@ -49,7 +49,7 @@ IF (MSVC AND $(WIN64))
PROPERTIES COMPILE_FLAGS -Od)
ENDIF (MSVC AND $(WIN64))
SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
SET(XTRADB_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
data/data0data.c data/data0type.c
dict/dict0boot.c dict/dict0crea.c dict/dict0dict.c dict/dict0load.c dict/dict0mem.c
......@@ -85,17 +85,16 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
ADD_DEFINITIONS(-DHAVE_WINDOWS_ATOMICS -DIB_HAVE_PAUSE_INSTRUCTION)
IF (MYSQL_VERSION_ID GREATER "50137")
MYSQL_STORAGE_ENGINE(INNOBASE)
# Use ha_innodb for plugin name, if plugin is built
GET_TARGET_PROPERTY(LIB_LOCATION ha_innobase LOCATION)
MYSQL_STORAGE_ENGINE(XTRADB)
GET_TARGET_PROPERTY(LIB_LOCATION ha_xtradb LOCATION)
IF(LIB_LOCATION)
SET_TARGET_PROPERTIES(ha_innobase PROPERTIES OUTPUT_NAME ha_innodb)
SET_TARGET_PROPERTIES(ha_xtradb PROPERTIES OUTPUT_NAME ha_xtradb)
ENDIF(LIB_LOCATION)
ELSE (MYSQL_VERSION_ID GREATER "50137")
IF (NOT SOURCE_SUBLIBS)
ADD_DEFINITIONS(-D_WIN32 -DMYSQL_SERVER)
ADD_LIBRARY(innobase STATIC ${INNOBASE_SOURCES})
ADD_LIBRARY(xtradb STATIC ${XTRADB_SOURCES})
# Require mysqld_error.h, which is built as part of the GenError
ADD_DEPENDENCIES(innobase GenError)
ADD_DEPENDENCIES(xtradb GenError)
ENDIF (NOT SOURCE_SUBLIBS)
ENDIF (MYSQL_VERSION_ID GREATER "50137")
......@@ -228,9 +228,9 @@ noinst_HEADERS= \
handler/innodb_patch_info.h \
mem/mem0dbg.c
EXTRA_LIBRARIES= libinnobase.a
noinst_LIBRARIES= @plugin_innobase_static_target@
libinnobase_a_SOURCES= \
EXTRA_LIBRARIES= libxtradb.a
noinst_LIBRARIES= @plugin_xtradb_static_target@
libxtradb_a_SOURCES= \
btr/btr0btr.c \
btr/btr0cur.c \
btr/btr0pcur.c \
......@@ -324,16 +324,16 @@ libinnobase_a_SOURCES= \
ut/ut0vec.c \
ut/ut0wqueue.c
libinnobase_a_CXXFLAGS= $(AM_CFLAGS)
libinnobase_a_CFLAGS= $(AM_CFLAGS)
libxtradb_a_CXXFLAGS= $(AM_CFLAGS)
libxtradb_a_CFLAGS= $(AM_CFLAGS)
EXTRA_LTLIBRARIES= ha_innodb.la
pkgplugin_LTLIBRARIES= @plugin_innobase_shared_target@
EXTRA_LTLIBRARIES= ha_xtradb.la
pkgplugin_LTLIBRARIES= @plugin_xtradb_shared_target@
ha_innodb_la_LDFLAGS= -module -rpath $(pkgplugindir)
ha_innodb_la_CXXFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_innodb_la_CFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_innodb_la_SOURCES= $(libinnobase_a_SOURCES)
ha_xtradb_la_LDFLAGS= -module -rpath $(pkgplugindir)
ha_xtradb_la_CXXFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_xtradb_la_CFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_xtradb_la_SOURCES= $(libxtradb_a_SOURCES)
EXTRA_DIST= CMakeLists.txt plug.in \
pars/make_bison.sh pars/make_flex.sh \
......
......@@ -10920,7 +10920,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
NULL
};
mysql_declare_plugin(innobase)
mysql_declare_plugin(xtradb)
{
MYSQL_STORAGE_ENGINE_PLUGIN,
&innobase_storage_engine,
......
......@@ -14,12 +14,12 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
#
MYSQL_STORAGE_ENGINE(innobase, innodb, [InnoDB Storage Engine],
[Transactional Tables using InnoDB], [max,max-no-ndb])
MYSQL_PLUGIN_DIRECTORY(innobase, [storage/xtradb])
MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a])
MYSQL_PLUGIN_DYNAMIC(innobase, [ha_innodb.la])
MYSQL_PLUGIN_ACTIONS(innobase, [
MYSQL_STORAGE_ENGINE(xtradb, innodb, [XtraDB Storage Engine],
[XtraDB - a drop-in replacement for InnoDB], [max,max-no-ndb])
MYSQL_PLUGIN_DIRECTORY(xtradb, [storage/xtradb])
MYSQL_PLUGIN_STATIC(xtradb, [libxtradb.a])
MYSQL_PLUGIN_DYNAMIC(xtradb, [ha_xtradb.la])
MYSQL_PLUGIN_ACTIONS(xtradb, [
AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
AC_SUBST(innodb_system_libs)
AC_CHECK_HEADERS(aio.h sched.h)
......
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