From 14e53d066807f7164d94dd8449ab4458509ada88 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 9 Jun 2010 23:29:18 +0200 Subject: [PATCH] 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 --- storage/federated/Makefile.am | 4 +--- .../federated/{plug.in.disabled => plug.in} | 2 +- storage/federatedx/Makefile.am | 4 ++-- storage/federatedx/ha_federatedx.cc | 2 +- storage/federatedx/plug.in | 8 +++---- .../{plug.in.disabled => plug.in} | 2 +- storage/xtradb/CMakeLists.txt | 15 ++++++------- storage/xtradb/Makefile.am | 22 +++++++++---------- storage/xtradb/handler/ha_innodb.cc | 2 +- storage/xtradb/plug.in | 12 +++++----- 10 files changed, 35 insertions(+), 38 deletions(-) rename storage/federated/{plug.in.disabled => plug.in} (76%) rename storage/innodb_plugin/{plug.in.disabled => plug.in} (98%) diff --git a/storage/federated/Makefile.am b/storage/federated/Makefile.am index 64ea0207017..26786ee48cb 100644 --- a/storage/federated/Makefile.am +++ b/storage/federated/Makefile.am @@ -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 diff --git a/storage/federated/plug.in.disabled b/storage/federated/plug.in similarity index 76% rename from storage/federated/plug.in.disabled rename to storage/federated/plug.in index 23b607d699b..714888b2ebf 100644 --- a/storage/federated/plug.in.disabled +++ b/storage/federated/plug.in @@ -1,5 +1,5 @@ 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]) diff --git a/storage/federatedx/Makefile.am b/storage/federatedx/Makefile.am index ad1328247ec..1781a53a0b6 100644 --- a/storage/federatedx/Makefile.am +++ b/storage/federatedx/Makefile.am @@ -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 \ diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc index 2c74b2f6675..57bfb1148bf 100644 --- a/storage/federatedx/ha_federatedx.cc +++ b/storage/federatedx/ha_federatedx.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, diff --git a/storage/federatedx/plug.in b/storage/federatedx/plug.in index ee2e6af0e94..95afe270f4c 100644 --- a/storage/federatedx/plug.in +++ b/storage/federatedx/plug.in @@ -1,5 +1,5 @@ -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]) diff --git a/storage/innodb_plugin/plug.in.disabled b/storage/innodb_plugin/plug.in similarity index 98% rename from storage/innodb_plugin/plug.in.disabled rename to storage/innodb_plugin/plug.in index e638332d74a..38e14d9d2fd 100644 --- a/storage/innodb_plugin/plug.in.disabled +++ b/storage/innodb_plugin/plug.in @@ -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, [ diff --git a/storage/xtradb/CMakeLists.txt b/storage/xtradb/CMakeLists.txt index 38a9700df20..8bdc029329d 100644 --- a/storage/xtradb/CMakeLists.txt +++ b/storage/xtradb/CMakeLists.txt @@ -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") diff --git a/storage/xtradb/Makefile.am b/storage/xtradb/Makefile.am index 53413dfaeb8..36d250890f5 100644 --- a/storage/xtradb/Makefile.am +++ b/storage/xtradb/Makefile.am @@ -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 \ diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 63083e27b26..230a4fde81f 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -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, diff --git a/storage/xtradb/plug.in b/storage/xtradb/plug.in index 2d7bd51ec17..013ee4349f8 100644 --- a/storage/xtradb/plug.in +++ b/storage/xtradb/plug.in @@ -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)