Commit ad4c32c8 authored by unknown's avatar unknown
Browse files

WL#3201 additional post-review fixes


config/ac-macros/plugins.m4:
  remove unneccessary `ifelse'
  add comment, add missing dnl
configure.in:
  change description for heap engine
include/mysql/plugin.h:
  change macro name
sql/ha_berkeley.cc:
  store strings statically for use in handlerton and plugin structures
sql/ha_federated.cc:
  store strings statically for use in handlerton and plugin structures
sql/ha_heap.cc:
  store strings statically for use in handlerton and plugin structures
sql/ha_innodb.cc:
  store strings statically for use in handlerton and plugin structures
sql/ha_myisam.cc:
  store strings statically for use in handlerton and plugin structures
sql/ha_myisammrg.cc:
  store strings statically for use in handlerton and plugin structures
sql/ha_ndbcluster.cc:
  store strings statically for use in handlerton and plugin structures
sql/ha_partition.cc:
  store strings statically for use in handlerton and plugin structures
storage/archive/ha_archive.cc:
  store strings statically for use in handlerton and plugin structures
storage/blackhole/ha_blackhole.cc:
  store strings statically for use in handlerton and plugin structures
storage/csv/ha_tina.cc:
  store strings statically for use in handlerton and plugin structures
storage/example/ha_example.cc:
  store strings statically for use in handlerton and plugin structures
parent b0efe477
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -38,11 +38,9 @@ AC_DEFUN([_MYSQL_PLUGIN],[
  _MYSQL_PLUGAPPEND([__mysql_plugin_list__],[$1])
  m4_define([MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]), [$3])
  m4_define([MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]), [$4])
  ifelse([$5], [], [], [
  _MYSQL_PLUGAPPEND_META([$1], $5)
 ])
])
])


dnl ---------------------------------------------------------------------------
@@ -351,11 +349,13 @@ AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
    else
      m4_ifdef([$7],[
       ifelse(m4_bregexp($7, [^lib[^.]+\.a$]), -2, [
dnl change above "-2" to "0" to enable this section
dnl Although this is "pretty", it breaks libmysqld build
        m4_ifdef([$6],[
         mysql_use_plugin_dir="$6"
         mysql_plugin_libs="$mysql_plugin_libs -L[\$(top_builddir)]/$6"
        ])
        mysql_plugin_libs="$mysql_plugin_libs
        mysql_plugin_libs="$mysql_plugin_libs dnl
[-l]m4_bregexp($7, [^lib\([^.]+\)], [\1])"
       ], m4_bregexp($7, [^\\\$]), 0, [
        m4_ifdef([$6],[
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ MYSQL_PLUGIN_DIRECTORY(ftexample, [plugin/fulltext])
MYSQL_PLUGIN_DYNAMIC(ftexample, [mypluglib.la])

MYSQL_STORAGE_ENGINE(heap,no,   [Memory Storage Engine],
        [In memory hashed tables])
        [Volatile memory based tables])
MYSQL_PLUGIN_DIRECTORY(heap,    [storage/heap])
MYSQL_PLUGIN_STATIC(heap,       [libheap.a])
MYSQL_PLUGIN_MANDATORY(heap)    dnl Memory tables
+5 −5
Original line number Diff line number Diff line
@@ -39,23 +39,23 @@


#ifndef MYSQL_DYNAMIC_PLUGIN
#define __DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS)                         \
#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS)                   \
int VERSION= MYSQL_PLUGIN_INTERFACE_VERSION;                                  \
int PSIZE= sizeof(struct st_mysql_plugin);                                    \
struct st_mysql_plugin DECLS[]= {
#else
#define __DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS)                         \
#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS)                   \
int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION;         \
int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_mysql_plugin);          \
struct st_mysql_plugin _mysql_plugin_declarations_[]= {
#endif

#define _DECLARE_PLUGIN(NAME) \
__DECLARE_PLUGIN(NAME, builtin_ ## NAME ## _plugin_interface_version, \
#define mysql_declare_plugin(NAME) \
__MYSQL_DECLARE_PLUGIN(NAME, \
                 builtin_ ## NAME ## _plugin_interface_version, \
                 builtin_ ## NAME ## _sizeof_struct_st_plugin, \
                 builtin_ ## NAME ## _plugin)

#define mysql_declare_plugin(NAME) _DECLARE_PLUGIN(NAME)
#define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0}}

/*
+9 −5
Original line number Diff line number Diff line
@@ -125,11 +125,15 @@ static int berkeley_savepoint(THD* thd, void *savepoint);
static int berkeley_release_savepoint(THD* thd, void *savepoint);
static handler *berkeley_create_handler(TABLE_SHARE *table);

static const char berkeley_hton_name[]= "BerkeleyDB";
static const char berkeley_hton_comment[]=
  "Supports transactions and page-level locking";

handlerton berkeley_hton = {
  MYSQL_HANDLERTON_INTERFACE_VERSION,
  "BerkeleyDB",
  berkeley_hton_name,
  SHOW_OPTION_YES,
  "Supports transactions and page-level locking", 
  berkeley_hton_comment, 
  DB_TYPE_BERKELEY_DB,
  berkeley_init,
  0, /* slot */
@@ -2733,9 +2737,9 @@ mysql_declare_plugin(berkeley)
{
  MYSQL_STORAGE_ENGINE_PLUGIN,
  &berkeley_hton,
  berkeley_hton.name,
  "MySQL AB",
  "BerkeleyDB Storage Engine",
  berkeley_hton_name,
  "Sleepycat Software",
  berkeley_hton_comment,
  NULL, /* Plugin Init */
  NULL, /* Plugin Deinit */
  0x0100 /* 1.0 */,
+7 −4
Original line number Diff line number Diff line
@@ -370,11 +370,14 @@ static int federated_rollback(THD *thd, bool all);

/* Federated storage engine handlerton */

static const char federated_hton_name[]= "FEDERATED";
static const char federated_hton_comment[]= "Federated MySQL storage engine";

handlerton federated_hton= {
  MYSQL_HANDLERTON_INTERFACE_VERSION,
  "FEDERATED",
  federated_hton_name,
  SHOW_OPTION_YES,
  "Federated MySQL storage engine", 
  federated_hton_comment, 
  DB_TYPE_FEDERATED_DB,
  federated_db_init,
  0,       /* slot */
@@ -2813,9 +2816,9 @@ mysql_declare_plugin(federated)
{
  MYSQL_STORAGE_ENGINE_PLUGIN,
  &federated_hton,
  federated_hton.name,
  federated_hton_name,
  "Patrick Galbraith and Brian Aker, MySQL AB",
  "Federated Storage Engine",
  federated_hton_comment,
  NULL, /* Plugin Init */
  NULL, /* Plugin Deinit */
  0x0100 /* 1.0 */,
Loading