summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <acurtis@xiphis.org>2006-05-02 12:04:20 -0700
committerunknown <acurtis@xiphis.org>2006-05-02 12:04:20 -0700
commitd609b7b91f6070856b02ace4d6c4de498cd5879e (patch)
treee5f9a8c1b3ec1a6e99de84cf9d1e119a08f65c07
parentad4c32c89a1b12a38518b589c944ac06ae023b50 (diff)
downloadmariadb-git-d609b7b91f6070856b02ace4d6c4de498cd5879e.tar.gz
WL#3201 post-review fixups
config/ac-macros/plugins.m4: WL#3201 fixup dynamic-only plugin support. sql/log.cc: fixup static initializers
-rw-r--r--config/ac-macros/plugins.m422
-rw-r--r--sql/log.cc12
2 files changed, 27 insertions, 7 deletions
diff --git a/config/ac-macros/plugins.m4 b/config/ac-macros/plugins.m4
index 385b6f1d66c..79353201971 100644
--- a/config/ac-macros/plugins.m4
+++ b/config/ac-macros/plugins.m4
@@ -325,6 +325,7 @@ AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
if test "X[$with_plugin_]$2" = Xno; then
AC_MSG_RESULT([no])
else
+ m4_ifdef([$8],m4_ifdef([$7],[],[[with_plugin_]$2='']))
if test "X[$mysql_plugin_]$2" != Xyes -a \
"X[$with_plugin_]$2" != Xyes; then
m4_ifdef([$8],[
@@ -504,6 +505,8 @@ dnl _MYSQL_PLUGAPPEND([name],[to-append])
dnl
dnl DESCRIPTION
dnl Helper macro for appending to colon-delimited lists
+dnl Optinal 3rd argument is for actions only required when defining
+dnl macro named for the first time.
AC_DEFUN([_MYSQL_PLUGAPPEND],[
m4_ifdef([$1],[
@@ -594,8 +597,8 @@ m4_ifdef([$9],[
])
AC_DEFUN([_PLUGIN_BUILD_TYPE],
-[m4_ifdef([$1],[ifelse($1,[no],[],[static ]m4_ifdef([$2],[and dnl
-]))])[]m4_ifdef([$2],[dynamic],[m4_ifdef([$1],[],[static])])])
+[m4_ifdef([$1],[static ]m4_ifdef([$2],[and dnl
+]))[]m4_ifdef([$2],[dynamic],[m4_ifdef([$1],[],[static])])])
dnl ---------------------------------------------------------------------------
@@ -610,13 +613,26 @@ AC_DEFUN([_MYSQL_EMIT_PLUGINS],[
m4_ifdef([MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),[
AC_MSG_ERROR([plugin $1 is disabled])
],[
- [mysql_plugin_]m4_bpatsubst([$1], -, _)=yes
+ _MYSQL_EMIT_PLUGIN_ENABLE([$1], m4_bpatsubst([$1], -, _),
+ [MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]))
])
;;
_MYSQL_EMIT_PLUGINS(m4_shift($@))
])
])
+AC_DEFUN([_MYSQL_EMIT_PLUGIN_ENABLE],[
+ m4_ifdef([$5],m4_ifdef([$4],[
+ [mysql_plugin_]$2=yes
+ ],[
+ AC_MSG_WARN([$3 can only be built as a plugin])
+ ]),[
+ [mysql_plugin_]$2=yes
+ ])
+])
+
AC_DEFUN([_MYSQL_EMIT_PLUGIN_DEPENDS], [
ifelse($#, 0, [], [$#:$1], [1:], [], [
_MYSQL_EMIT_CHECK_DEPENDS(m4_bpatsubst([$1], -, _),
diff --git a/sql/log.cc b/sql/log.cc
index 61d280f8504..e9a5011db4d 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -70,11 +70,15 @@ struct binlog_trx_data {
Rows_log_event *pending; // The pending binrows event
};
+static const char binlog_hton_name[]= "binlog";
+static const char binlog_hton_comment[]=
+ "This is a meta storage engine to represent the binlog in a transaction";
+
handlerton binlog_hton = {
MYSQL_HANDLERTON_INTERFACE_VERSION,
- "binlog",
+ binlog_hton_name,
SHOW_OPTION_YES,
- "This is a meta storage engine to represent the binlog in a transaction",
+ binlog_hton_comment,
DB_TYPE_BINLOG, /* IGNORE for now */
binlog_init,
0,
@@ -4350,9 +4354,9 @@ mysql_declare_plugin(binlog)
{
MYSQL_STORAGE_ENGINE_PLUGIN,
&binlog_hton,
- binlog_hton.name,
+ binlog_hton_name,
"MySQL AB",
- "Binlog Engine",
+ binlog_hton_comment,
NULL, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,