Commit 797cc5a7 authored by Satya B's avatar Satya B

Compile the Innodb plugin so that it can be installed as dynamic plugin only for now.

The Innodb plugin 1.0.4 can be installed dynamically using the 'INSTALL PLUGIN' syntax

If mysqld is already statically linked with the inbuilt innodb, it is not possible to 
install the innodb plugin 1.0.4 dynamically. Doing so would throw this error - Function
'innodb' already exists.

storage/innodb_plugin/Makefile.am:
  Remove references of 'storage/innobase' and use $(srcdir) instead. 
  Renamed the dynamic plugin library name to 'ha_innodb_plugin' so 
  that it can be installed along with inbuilt plugin.
storage/innodb_plugin/Makefile.in:
  Remove this file as it can be generated automatically by automake
  using the Makefile.am
storage/innodb_plugin/handler/ha_innodb.cc:
  Remove refernces to "storage/innobase" and the headers can be included directly.
  Declare the plugin with the new name innodb_plugin
storage/innodb_plugin/plug.in:
  Rename the plugin innobase as innodb_plugin
parent 3945d5e5
......@@ -22,7 +22,7 @@ MYSQLLIBdir= $(pkglibdir)
pkgplugindir= $(pkglibdir)/plugin
INCLUDES= -I$(top_srcdir)/include -I$(top_builddir)/include \
-I$(top_srcdir)/regex \
-I$(top_srcdir)/storage/innobase/include \
-I$(srcdir)/include \
-I$(top_srcdir)/sql \
-I$(srcdir)
......@@ -134,7 +134,7 @@ noinst_HEADERS= include/btr0btr.h include/btr0btr.ic \
handler/i_s.h
EXTRA_LIBRARIES= libinnobase.a
noinst_LIBRARIES= @plugin_innobase_static_target@
noinst_LIBRARIES= @plugin_innodb_plugin_static_target@
libinnobase_a_SOURCES= btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c \
btr/btr0sea.c buf/buf0buddy.c \
buf/buf0buf.c buf/buf0flu.c \
......@@ -179,13 +179,13 @@ libinnobase_a_SOURCES= btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c \
libinnobase_a_CXXFLAGS= $(AM_CFLAGS)
libinnobase_a_CFLAGS= $(AM_CFLAGS)
EXTRA_LTLIBRARIES= ha_innodb.la
pkgplugin_LTLIBRARIES= @plugin_innobase_shared_target@
EXTRA_LTLIBRARIES= ha_innodb_plugin.la
pkgplugin_LTLIBRARIES= @plugin_innodb_plugin_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_innodb_plugin_la_LDFLAGS= -module -rpath $(pkgplugindir)
ha_innodb_plugin_la_CXXFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_innodb_plugin_la_CFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_innodb_plugin_la_SOURCES= $(libinnobase_a_SOURCES)
EXTRA_DIST= CMakeLists.txt plug.in \
pars/make_bison.sh pars/make_flex.sh \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -43,35 +43,35 @@ Place, Suite 330, Boston, MA 02111-1307 USA
/* Include necessary InnoDB headers */
extern "C" {
#include "../storage/innobase/include/univ.i"
#include "../storage/innobase/include/btr0sea.h"
#include "../storage/innobase/include/os0file.h"
#include "../storage/innobase/include/os0thread.h"
#include "../storage/innobase/include/srv0start.h"
#include "../storage/innobase/include/srv0srv.h"
#include "../storage/innobase/include/trx0roll.h"
#include "../storage/innobase/include/trx0trx.h"
#include "../storage/innobase/include/trx0sys.h"
#include "../storage/innobase/include/mtr0mtr.h"
#include "../storage/innobase/include/row0ins.h"
#include "../storage/innobase/include/row0mysql.h"
#include "../storage/innobase/include/row0sel.h"
#include "../storage/innobase/include/row0upd.h"
#include "../storage/innobase/include/log0log.h"
#include "../storage/innobase/include/lock0lock.h"
#include "../storage/innobase/include/dict0crea.h"
#include "../storage/innobase/include/btr0cur.h"
#include "../storage/innobase/include/btr0btr.h"
#include "../storage/innobase/include/fsp0fsp.h"
#include "../storage/innobase/include/sync0sync.h"
#include "../storage/innobase/include/fil0fil.h"
#include "../storage/innobase/include/trx0xa.h"
#include "../storage/innobase/include/row0merge.h"
#include "../storage/innobase/include/thr0loc.h"
#include "../storage/innobase/include/dict0boot.h"
#include "../storage/innobase/include/ha_prototypes.h"
#include "../storage/innobase/include/ut0mem.h"
#include "../storage/innobase/include/ibuf0ibuf.h"
#include "univ.i"
#include "btr0sea.h"
#include "os0file.h"
#include "os0thread.h"
#include "srv0start.h"
#include "srv0srv.h"
#include "trx0roll.h"
#include "trx0trx.h"
#include "trx0sys.h"
#include "mtr0mtr.h"
#include "row0ins.h"
#include "row0mysql.h"
#include "row0sel.h"
#include "row0upd.h"
#include "log0log.h"
#include "lock0lock.h"
#include "dict0crea.h"
#include "btr0cur.h"
#include "btr0btr.h"
#include "fsp0fsp.h"
#include "sync0sync.h"
#include "fil0fil.h"
#include "trx0xa.h"
#include "row0merge.h"
#include "thr0loc.h"
#include "dict0boot.h"
#include "ha_prototypes.h"
#include "ut0mem.h"
#include "ibuf0ibuf.h"
}
#include "ha_innodb.h"
......@@ -9787,7 +9787,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
NULL
};
mysql_declare_plugin(innobase)
mysql_declare_plugin(innodb_plugin)
{
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],
MYSQL_STORAGE_ENGINE(innodb_plugin, innodb, [InnoDB Storage Engine],
[Transactional Tables using InnoDB], [max,max-no-ndb])
MYSQL_PLUGIN_DIRECTORY(innobase, [storage/innobase])
MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a])
MYSQL_PLUGIN_DYNAMIC(innobase, [ha_innodb.la])
MYSQL_PLUGIN_ACTIONS(innobase, [
MYSQL_PLUGIN_DIRECTORY(innodb_plugin, [storage/innodb_plugin])
#MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a])
MYSQL_PLUGIN_DYNAMIC(innodb_plugin, [ha_innodb_plugin.la])
MYSQL_PLUGIN_ACTIONS(innodb_plugin, [
AC_CHECK_HEADERS(sched.h)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 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