From: Jonathan Perkin Date: December 19 2007 1:24pm Subject: bk commit into 5.1 tree (jperkin:1.2645) BUG#31736 List-Archive: http://lists.mysql.com/commits/40206 X-Bug: 31736 Message-Id: <20071219132450.6B5C06A028E@chorlton.adsl.perkin.org.uk> Below is the list of changes that have just been committed into a local 5.1 repository of jperkin. When jperkin does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-12-19 13:24:43+00:00, jperkin@stripped +14 -0 Add new pkgplugindir handling to seperate plugins from libraries, and allow override for binary distributions. Extend mysql_config to print compiled-in plugin location for third-party plugins to use. Resolves bug#31736. libmysqld/Makefile.am@stripped, 2007-12-19 10:26:20+00:00, jperkin@stripped +2 -1 Use pkgplugindir. plugin/daemon_example/Makefile.am@stripped, 2007-12-19 10:28:10+00:00, jperkin@stripped +3 -2 Use pkgplugindir. plugin/fulltext/Makefile.am@stripped, 2007-12-19 10:29:28+00:00, jperkin@stripped +3 -3 Use pkgplugindir. scripts/Makefile.am@stripped, 2007-12-19 10:30:32+00:00, jperkin@stripped +3 -0 Add pkgplugindir. scripts/make_binary_distribution.sh@stripped, 2007-12-19 10:32:14+00:00, jperkin@stripped +3 -0 Add pkgplugindir. scripts/mysql_config.sh@stripped, 2007-12-19 10:34:00+00:00, jperkin@stripped +4 -0 Add pkgplugindir. sql/Makefile.am@stripped, 2007-12-19 10:34:56+00:00, jperkin@stripped +2 -1 Use pkgplugindir. sql/mysqld.cc@stripped, 2007-12-19 10:35:30+00:00, jperkin@stripped +1 -1 Use PLUGINDIR, derived from pkgplugindir, instead of LIBDIR for plugins. sql/unireg.h@stripped, 2007-12-19 10:36:46+00:00, jperkin@stripped +2 -2 Use PLUGINDIR instead of LIBDIR, and define to be the default setting of pkgplugindir. storage/archive/Makefile.am@stripped, 2007-12-19 11:03:03+00:00, jperkin@stripped +3 -2 Use pkgplugindir. storage/blackhole/Makefile.am@stripped, 2007-12-19 11:05:09+00:00, jperkin@stripped +3 -2 Use pkgplugindir. storage/example/Makefile.am@stripped, 2007-12-19 11:07:59+00:00, jperkin@stripped +3 -2 Use pkgplugindir. storage/federated/Makefile.am@stripped, 2007-12-19 11:09:33+00:00, jperkin@stripped +3 -2 Use pkgplugindir. storage/innobase/Makefile.am@stripped, 2007-12-19 10:56:29+00:00, jperkin@stripped +2 -1 Use pkgplugindir. diff -Nrup a/libmysqld/Makefile.am b/libmysqld/Makefile.am --- a/libmysqld/Makefile.am 2007-08-31 00:23:07 +01:00 +++ b/libmysqld/Makefile.am 2007-12-19 10:26:20 +00:00 @@ -21,13 +21,14 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(libdir) +pkgplugindir = $(libdir)/@PACKAGE@/plugin EXTRA_DIST = libmysqld.def CMakeLists.txt DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \ -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \ -DDATADIR="\"$(MYSQLDATAdir)\"" \ -DSHAREDIR="\"$(MYSQLSHAREdir)\"" \ - -DLIBDIR="\"$(MYSQLLIBdir)\"" + -DPLUGINDIR="\"$(pkgplugindir)\"" INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_builddir)/sql -I$(top_srcdir)/sql \ -I$(top_srcdir)/sql/examples \ diff -Nrup a/plugin/daemon_example/Makefile.am b/plugin/daemon_example/Makefile.am --- a/plugin/daemon_example/Makefile.am 2007-05-28 21:17:02 +01:00 +++ b/plugin/daemon_example/Makefile.am 2007-12-19 10:28:10 +00:00 @@ -18,14 +18,15 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ -I$(srcdir) @ZLIB_INCLUDES@ EXTRA_LTLIBRARIES = libdaemon_example.la -pkglib_LTLIBRARIES = @plugin_daemon_example_shared_target@ -libdaemon_example_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) +pkgplugin_LTLIBRARIES = @plugin_daemon_example_shared_target@ +libdaemon_example_la_LDFLAGS = -module -rpath $(pkgplugindir) libdaemon_example_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN libdaemon_example_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN libdaemon_example_la_SOURCES = daemon_example.cc diff -Nrup a/plugin/fulltext/Makefile.am b/plugin/fulltext/Makefile.am --- a/plugin/fulltext/Makefile.am 2007-05-28 21:17:33 +01:00 +++ b/plugin/fulltext/Makefile.am 2007-12-19 10:29:28 +00:00 @@ -15,12 +15,12 @@ #Makefile.am example for a plugin -pkglibdir=$(libdir)/mysql +pkgplugindir=$(libdir)/@PACKAGE@/plugin INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include #noinst_LTLIBRARIES= mypluglib.la -pkglib_LTLIBRARIES= mypluglib.la +pkgplugin_LTLIBRARIES= mypluglib.la mypluglib_la_SOURCES= plugin_example.c -mypluglib_la_LDFLAGS= -module -rpath $(pkglibdir) +mypluglib_la_LDFLAGS= -module -rpath $(pkgplugindir) mypluglib_la_CFLAGS= -DMYSQL_DYNAMIC_PLUGIN # Don't update the files from bitkeeper diff -Nrup a/scripts/Makefile.am b/scripts/Makefile.am --- a/scripts/Makefile.am 2007-10-19 18:26:57 +01:00 +++ b/scripts/Makefile.am 2007-12-19 10:30:32 +00:00 @@ -90,6 +90,8 @@ CLEANFILES = @server_scripts@ \ mysql_tableinfo \ mysqld_multi +pkgplugindir = $(libdir)/@PACKAGE@/plugin + # Default same as 'pkgdatadir', but we can override it pkgsuppdir = $(datadir)/@PACKAGE@ @@ -137,6 +139,7 @@ SUFFIXES = .sh -e 's!@''pkglibdir''@!$(pkglibdir)!g' \ -e 's!@''pkgincludedir''@!$(pkgincludedir)!g' \ -e 's!@''pkgdatadir''@!$(pkgdatadir)!g' \ + -e 's!@''pkgplugindir''@!$(pkgplugindir)!g' \ -e 's!@''pkgsuppdir''@!$(pkgsuppdir)!g' \ -e 's!@''sysconfdir''@!$(sysconfdir)!g' \ -e 's!@''mandir''@!$(mandir)!g' \ diff -Nrup a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh --- a/scripts/make_binary_distribution.sh 2007-10-01 17:40:40 +01:00 +++ b/scripts/make_binary_distribution.sh 2007-12-19 10:32:14 +00:00 @@ -30,6 +30,8 @@ # "pkglibdir" is set to the same as "libdir" # "pkgincludedir" is set to the same as "includedir" # "pkgdatadir" is set to the same as "datadir" +# "pkgplugindir" is set to "@prefix@/lib/plugin", +# normally "$libdir/plugin" # "pkgsuppdir" is set to "@prefix@/support-files", # normally the same as "datadir" # @@ -204,6 +206,7 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; t pkglibdir=@pkglibdir@ \ pkgincludedir=@pkgincludedir@ \ pkgdatadir=@pkgdatadir@ \ + pkgplugindir=@pkgplugindir@ \ pkgsuppdir=@pkgsuppdir@ \ mandir=@mandir@ \ infodir=@infodir@ diff -Nrup a/scripts/mysql_config.sh b/scripts/mysql_config.sh --- a/scripts/mysql_config.sh 2007-09-28 17:57:11 +01:00 +++ b/scripts/mysql_config.sh 2007-12-19 10:34:00 +00:00 @@ -87,6 +87,8 @@ pkglibdir='@pkglibdir@' pkglibdir_rel=`echo $pkglibdir | sed -e "s;^$basedir/;;"` fix_path pkglibdir $pkglibdir_rel lib/mysql lib +plugindir='@pkgplugindir@' + pkgincludedir='@pkgincludedir@' fix_path pkgincludedir include/mysql include @@ -147,6 +149,7 @@ Options: --include [$include] --libs [$libs] --libs_r [$libs_r] + --plugindir [$plugindir] --socket [$socket] --port [$port] --version [$version] @@ -163,6 +166,7 @@ while test $# -gt 0; do --include) echo "$include" ;; --libs) echo "$libs" ;; --libs_r) echo "$libs_r" ;; + --plugindir) echo "$plugindir" ;; --socket) echo "$socket" ;; --port) echo "$port" ;; --version) echo "$version" ;; diff -Nrup a/sql/Makefile.am b/sql/Makefile.am --- a/sql/Makefile.am 2007-10-08 19:55:16 +01:00 +++ b/sql/Makefile.am 2007-12-19 10:34:56 +00:00 @@ -19,6 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/plugin INCLUDES = @ZLIB_INCLUDES@ \ -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_srcdir)/regex -I$(srcdir) $(openssl_includes) @@ -136,7 +137,7 @@ DEFS = -DMYSQL_SERVER \ -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \ -DDATADIR="\"$(MYSQLDATAdir)\"" \ -DSHAREDIR="\"$(MYSQLSHAREdir)\"" \ - -DLIBDIR="\"$(MYSQLLIBdir)\"" \ + -DPLUGINDIR="\"$(pkgplugindir)\"" \ @DEFS@ BUILT_MAINT_SRC = sql_yacc.cc sql_yacc.h diff -Nrup a/sql/mysqld.cc b/sql/mysqld.cc --- a/sql/mysqld.cc 2007-12-15 13:59:38 +00:00 +++ b/sql/mysqld.cc 2007-12-19 10:35:30 +00:00 @@ -8032,7 +8032,7 @@ static void fix_paths(void) (void) my_load_path(mysql_real_data_home,mysql_real_data_home,mysql_home); (void) my_load_path(pidfile_name,pidfile_name,mysql_real_data_home); (void) my_load_path(opt_plugin_dir, opt_plugin_dir_ptr ? opt_plugin_dir_ptr : - get_relative_path(LIBDIR), mysql_home); + get_relative_path(PLUGINDIR), mysql_home); opt_plugin_dir_ptr= opt_plugin_dir; char *sharedir=get_relative_path(SHAREDIR); diff -Nrup a/sql/unireg.h b/sql/unireg.h --- a/sql/unireg.h 2007-09-10 12:16:01 +01:00 +++ b/sql/unireg.h 2007-12-19 10:36:46 +00:00 @@ -35,8 +35,8 @@ #ifndef SHAREDIR #define SHAREDIR "share/" #endif -#ifndef LIBDIR -#define LIBDIR "lib/" +#ifndef PLUGINDIR +#define PLUGINDIR "lib/plugin" #endif #define ER(X) errmesg[(X) - ER_ERROR_FIRST] diff -Nrup a/storage/archive/Makefile.am b/storage/archive/Makefile.am --- a/storage/archive/Makefile.am 2007-01-11 07:59:33 +00:00 +++ b/storage/archive/Makefile.am 2007-12-19 11:03:03 +00:00 @@ -19,6 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ @@ -33,8 +34,8 @@ noinst_HEADERS = ha_archive.h azlib.h noinst_PROGRAMS = archive_test archive_reader EXTRA_LTLIBRARIES = ha_archive.la -pkglib_LTLIBRARIES = @plugin_archive_shared_target@ -ha_archive_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) +pkgplugin_LTLIBRARIES = @plugin_archive_shared_target@ +ha_archive_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_archive_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_archive_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_archive_la_SOURCES = ha_archive.cc azio.c diff -Nrup a/storage/blackhole/Makefile.am b/storage/blackhole/Makefile.am --- a/storage/blackhole/Makefile.am 2006-12-31 01:24:03 +00:00 +++ b/storage/blackhole/Makefile.am 2007-12-19 11:05:09 +00:00 @@ -19,6 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ @@ -32,8 +33,8 @@ DEFS = @DEFS@ noinst_HEADERS = ha_blackhole.h EXTRA_LTLIBRARIES = ha_blackhole.la -pkglib_LTLIBRARIES = @plugin_blackhole_shared_target@ -ha_blackhole_la_LDFLAGS=-module -rpath $(MYSQLLIBdir) +pkgplugin_LTLIBRARIES = @plugin_blackhole_shared_target@ +ha_blackhole_la_LDFLAGS=-module -rpath $(pkgplugindir) ha_blackhole_la_CXXFLAGS=$(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_blackhole_la_CFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_blackhole_la_SOURCES=ha_blackhole.cc diff -Nrup a/storage/example/Makefile.am b/storage/example/Makefile.am --- a/storage/example/Makefile.am 2006-12-31 01:24:03 +00:00 +++ b/storage/example/Makefile.am 2007-12-19 11:07:59 +00:00 @@ -19,6 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/libdir INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ @@ -32,8 +33,8 @@ DEFS = @DEFS@ noinst_HEADERS = ha_example.h EXTRA_LTLIBRARIES = ha_example.la -pkglib_LTLIBRARIES = @plugin_example_shared_target@ -ha_example_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) +pkgplugin_LTLIBRARIES = @plugin_example_shared_target@ +ha_example_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_example_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_example_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_example_la_SOURCES = ha_example.cc diff -Nrup a/storage/federated/Makefile.am b/storage/federated/Makefile.am --- a/storage/federated/Makefile.am 2006-12-31 01:24:03 +00:00 +++ b/storage/federated/Makefile.am 2007-12-19 11:09:33 +00:00 @@ -19,6 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ @@ -32,8 +33,8 @@ DEFS = @DEFS@ noinst_HEADERS = ha_federated.h EXTRA_LTLIBRARIES = ha_federated.la -pkglib_LTLIBRARIES = @plugin_federated_shared_target@ -ha_federated_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) +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 diff -Nrup a/storage/innobase/Makefile.am b/storage/innobase/Makefile.am --- a/storage/innobase/Makefile.am 2007-07-25 02:27:12 +01:00 +++ b/storage/innobase/Makefile.am 2007-12-19 10:56:29 +00:00 @@ -19,6 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/libdir INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/storage/innobase/include \ @@ -160,7 +161,7 @@ libinnobase_a_CFLAGS = $(AM_CFLAGS) EXTRA_LTLIBRARIES = ha_innodb.la pkglib_LTLIBRARIES = @plugin_innobase_shared_target@ -ha_innodb_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) +ha_innodb_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_innodb_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_innodb_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_innodb_la_SOURCES = $(libinnobase_a_SOURCES)