← Back to team overview

maria-developers team mailing list archive

Rev 2734: Maria WL#61 in file:///Users/bell/maria/bzr/work-maria-5.2-engine/

 

At file:///Users/bell/maria/bzr/work-maria-5.2-engine/

------------------------------------------------------------
revno: 2734
revision-id: sanja@xxxxxxxxxxxx-20100311150203-mg6478pobnln5x22
parent: psergey@xxxxxxxxxxxx-20091202142609-18bp41q8mejxl47t
committer: sanja@xxxxxxxxxxxx
branch nick: work-maria-5.2-engine
timestamp: Thu 2010-03-11 17:02:03 +0200
message:
  Maria WL#61
  
  Interface for maria extensions.
  Alternative plugin interface with additional info (maturity and string version).
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt	2009-10-03 19:24:13 +0000
+++ b/CMakeLists.txt	2010-03-11 15:02:03 +0000
@@ -250,7 +250,7 @@
         ENDIF(WITH_${ENGINE}_STORAGE_ENGINE AND MYSQL_PLUGIN_STATIC)
 
         IF (ENGINE_BUILD_TYPE STREQUAL "STATIC") 
-          SET (mysql_plugin_defs  "${mysql_plugin_defs},builtin_${PLUGIN_NAME}_plugin")
+          SET (maria_plugin_defs  "${maria_plugin_defs},builtin_maria_${PLUGIN_NAME}_plugin")
           SET (MYSQLD_STATIC_ENGINE_LIBS ${MYSQLD_STATIC_ENGINE_LIBS} ${PLUGIN_NAME})
           SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_${ENGINE}_STORAGE_ENGINE")
           SET (WITH_${ENGINE}_STORAGE_ENGINE TRUE)
@@ -268,7 +268,7 @@
 # Special handling for partition(not really pluggable)
 IF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
   SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_PARTITION_STORAGE_ENGINE")
-  SET (mysql_plugin_defs  "${mysql_plugin_defs},builtin_partition_plugin")
+  SET (maria_plugin_defs  "${maria_plugin_defs},builtin_maria_partition_plugin")
 ENDIF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
 
 # Special handling for tmp tables with the maria engine

=== modified file 'config/ac-macros/plugins.m4'
--- a/config/ac-macros/plugins.m4	2009-04-25 10:05:32 +0000
+++ b/config/ac-macros/plugins.m4	2010-03-11 15:02:03 +0000
@@ -460,7 +460,7 @@
         ])
        ])
       ])
-      mysql_plugin_defs="$mysql_plugin_defs, [builtin_]$2[_plugin]"
+      maria_plugin_defs="$maria_plugin_defs, [builtin_maria_]$2[_plugin]"
       [with_plugin_]$2=yes
       AC_MSG_RESULT([yes])
       m4_ifdef([$11],[

=== modified file 'configure.in'
--- a/configure.in	2009-11-12 04:31:28 +0000
+++ b/configure.in	2010-03-11 15:02:03 +0000
@@ -2841,7 +2841,7 @@
 
 AC_SUBST(mysql_plugin_dirs)
 AC_SUBST(mysql_plugin_libs)
-AC_SUBST(mysql_plugin_defs)
+AC_SUBST(maria_plugin_defs)
 
 
 # Now that sql_client_dirs and sql_server_dirs are stable, determine the union.

=== modified file 'include/mysql/plugin.h'
--- a/include/mysql/plugin.h	2009-09-07 20:50:10 +0000
+++ b/include/mysql/plugin.h	2010-03-11 15:02:03 +0000
@@ -65,7 +65,10 @@
   Plugin API. Common for all plugin types.
 */
 
+/* MySQL plugin interface version */
 #define MYSQL_PLUGIN_INTERFACE_VERSION 0x0100
+/* MariaDB plugin interface version */
+#define MARIA_PLUGIN_INTERFACE_VERSION 0x0100
 
 /*
   The allowable types of plugins
@@ -86,6 +89,21 @@
 #define PLUGIN_LICENSE_GPL_STRING "GPL"
 #define PLUGIN_LICENSE_BSD_STRING "BSD"
 
+/* definitions of code maturity for plugins */
+#define PLUGIN_MATURITY_UNKNOWN 0
+#define PLUGIN_MATURITY_TEST 1
+#define PLUGIN_MATURITY_ALPHA 2
+#define PLUGIN_MATURITY_BETA 3
+#define PLUGIN_MATURITY_GAMMA 4
+#define PLUGIN_MATURITY_RELEASE 5
+
+#define PLUGIN_MATURITY_UNKNOWN_STR "Unknown"
+#define PLUGIN_MATURITY_TEST_STR "Test"
+#define PLUGIN_MATURITY_ALPHA_STR "Alpha"
+#define PLUGIN_MATURITY_BETA_STR "Beta"
+#define PLUGIN_MATURITY_GAMMA_STR "Gamma"
+#define PLUGIN_MATURITY_RELEASE_STR "Release"
+
 /*
   Macros for beginning and ending plugin declarations.  Between
   mysql_declare_plugin and mysql_declare_plugin_end there should
@@ -94,15 +112,29 @@
 
 
 #ifndef MYSQL_DYNAMIC_PLUGIN
+
 #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[]= {
+
+#define __MARIA_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS)                    \
+int VERSION= MARIA_PLUGIN_INTERFACE_VERSION;                                   \
+int PSIZE= sizeof(struct st_maria_plugin);                                     \
+struct st_maria_plugin DECLS[]= {
+
 #else
+
 #define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS)                   \
 MYSQL_PLUGIN_EXPORT int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION;         \
 MYSQL_PLUGIN_EXPORT int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_mysql_plugin);          \
 MYSQL_PLUGIN_EXPORT struct st_mysql_plugin _mysql_plugin_declarations_[]= {
+
+#define __MARIA_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS)                \
+MYSQL_PLUGIN_EXPORT int _maria_plugin_interface_version_= MARIA_PLUGIN_INTERFACE_VERSION;   \
+MYSQL_PLUGIN_EXPORT int _maria_sizeof_struct_st_plugin_= sizeof(struct st_maria_plugin);    \
+MYSQL_PLUGIN_EXPORT struct st_maria_plugin _maria_plugin_declarations_[]= {
+
 #endif
 
 #define mysql_declare_plugin(NAME) \
@@ -111,7 +143,14 @@
                  builtin_ ## NAME ## _sizeof_struct_st_plugin, \
                  builtin_ ## NAME ## _plugin)
 
+#define maria_declare_plugin(NAME) \
+__MARIA_DECLARE_PLUGIN(NAME, \
+                 builtin_maria_ ## NAME ## _plugin_interface_version, \
+                 builtin_maria_ ## NAME ## _sizeof_struct_st_plugin, \
+                 builtin_maria_ ## NAME ## _plugin)
+
 #define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0}}
+#define maria_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0,0,0}}
 
 /*
   declarations for SHOW STATUS support in plugins
@@ -407,6 +446,31 @@
   void * __reserved1;   /* reserved for dependency checking             */
 };
 
+/*
+  MariaDB extension for plugins declaration structure.
+
+  It also copy current MySQL plugin fields to have more independency
+  in plugins extension
+*/
+
+struct st_maria_plugin
+{
+  int type;             /* the plugin type (a MYSQL_XXX_PLUGIN value)   */
+  void *info;           /* pointer to type-specific plugin descriptor   */
+  const char *name;     /* plugin name                                  */
+  const char *author;   /* plugin author (for SHOW PLUGINS)             */
+  const char *descr;    /* general descriptive text (for SHOW PLUGINS ) */
+  int license;          /* the plugin license (PLUGIN_LICENSE_XXX)      */
+  int (*init)(void *);  /* the function to invoke when plugin is loaded */
+  int (*deinit)(void *);/* the function to invoke when plugin is unloaded */
+  unsigned int version; /* plugin version (for SHOW PLUGINS)            */
+  struct st_mysql_show_var *status_vars;
+  struct st_mysql_sys_var **system_vars;
+  const char *version_info;  /* plugin version string */
+  int maturity;              /* HA_PLUGIN_MATURITY_XXX */
+  void * __reserved1;   /* reserved for dependency checking             */
+};
+
 /*************************************************************************
   API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN)
 */

=== modified file 'include/mysql/plugin.h.pp'
--- a/include/mysql/plugin.h.pp	2008-10-10 15:28:41 +0000
+++ b/include/mysql/plugin.h.pp	2010-03-11 15:02:03 +0000
@@ -46,6 +46,23 @@
   struct st_mysql_sys_var **system_vars;
   void * __reserved1;
 };
+struct st_maria_plugin
+{
+  int type;
+  void *info;
+  const char *name;
+  const char *author;
+  const char *descr;
+  int license;
+  int (*init)(void *);
+  int (*deinit)(void *);
+  unsigned int version;
+  struct st_mysql_show_var *status_vars;
+  struct st_mysql_sys_var **system_vars;
+  const char *version_info;
+  int maturity;
+  void * __reserved1;
+};
 enum enum_ftparser_mode
 {
   MYSQL_FTPARSER_SIMPLE_MODE= 0,

=== modified file 'mysql-test/r/information_schema.result'
--- a/mysql-test/r/information_schema.result	2009-10-19 17:14:48 +0000
+++ b/mysql-test/r/information_schema.result	2010-03-11 15:02:03 +0000
@@ -1175,7 +1175,7 @@
 group by column_type order by num;
 column_type	group_concat(table_schema, '.', table_name)	num
 varchar(27)	information_schema.COLUMNS	1
-varchar(7)	information_schema.ROUTINES,information_schema.VIEWS	2
+varchar(7)	information_schema.PLUGINS,information_schema.ROUTINES,information_schema.VIEWS	3
 varchar(20)	information_schema.FILES,information_schema.FILES,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PROFILING	6
 create table t1(f1 char(1) not null, f2 char(9) not null)
 default character set utf8;

=== modified file 'plugin/daemon_example/daemon_example.cc'
--- a/plugin/daemon_example/daemon_example.cc	2007-06-27 14:49:12 +0000
+++ b/plugin/daemon_example/daemon_example.cc	2010-03-11 15:02:03 +0000
@@ -200,3 +200,21 @@
   NULL                        /* config options                  */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(daemon_example)
+{
+  MYSQL_DAEMON_PLUGIN,
+  &daemon_example_plugin,
+  "daemon_example",
+  "Brian Aker",
+  "Daemon example, creates a heartbeat beat file in mysql-heartbeat.log",
+  PLUGIN_LICENSE_GPL,
+  daemon_example_plugin_init, /* Plugin Init */
+  daemon_example_plugin_deinit, /* Plugin Deinit */
+  0x0100 /* 1.0 */,
+  NULL,                       /* status variables                */
+  NULL,                       /* system variables                */
+  "1.0",                      /* string version */
+  PLUGIN_MATURITY_TEST,       /* maturity */
+  NULL                        /* config options                  */
+}
+maria_declare_plugin_end;

=== modified file 'plugin/fulltext/plugin_example.c'
--- a/plugin/fulltext/plugin_example.c	2007-04-26 19:26:04 +0000
+++ b/plugin/fulltext/plugin_example.c	2010-03-11 15:02:03 +0000
@@ -270,4 +270,22 @@
   NULL
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(ftexample)
+{
+  MYSQL_FTPARSER_PLUGIN,      /* type                            */
+  &simple_parser_descriptor,  /* descriptor                      */
+  "simple_parser",            /* name                            */
+  "MySQL AB",                 /* author                          */
+  "Simple Full-Text Parser",  /* description                     */
+  PLUGIN_LICENSE_GPL,
+  simple_parser_plugin_init,  /* init function (when loaded)     */
+  simple_parser_plugin_deinit,/* deinit function (when unloaded) */
+  0x0001,                     /* version                         */
+  simple_status,              /* status variables                */
+  simple_system_variables,    /* system variables                */
+  "0.01",                     /* string version */
+  PLUGIN_MATURITY_TEST,       /* maturity */
+  NULL
+}
+maria_declare_plugin_end;
 

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2009-09-07 20:50:10 +0000
+++ b/sql/ha_ndbcluster.cc	2010-03-11 15:02:03 +0000
@@ -10561,5 +10561,23 @@
   NULL                        /* config options                  */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(ndbcluster)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &ndbcluster_storage_engine,
+  ndbcluster_hton_name,
+  "MySQL AB",
+  "Clustered, fault-tolerant tables",
+  PLUGIN_LICENSE_GPL,
+  ndbcluster_init, /* Plugin Init */
+  NULL, /* Plugin Deinit */
+  0x0100 /* 1.0 */,
+  ndb_status_variables_export,/* status variables                */
+  NULL,                       /* system variables                */
+  "1.0",                      /* string version */
+  PLUGIN_MATURITY_BETA,       /* maturity */
+  NULL                        /* config options                  */
+}
+maria_declare_plugin_end;
 
 #endif

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2009-11-12 04:31:28 +0000
+++ b/sql/ha_partition.cc	2010-03-11 15:02:03 +0000
@@ -6510,5 +6510,23 @@
   NULL                        /* config options                  */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(partition)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &partition_storage_engine,
+  "partition",
+  "Mikael Ronstrom, MySQL AB",
+  "Partition Storage Engine Helper",
+  PLUGIN_LICENSE_GPL,
+  partition_initialize, /* Plugin Init */
+  NULL, /* Plugin Deinit */
+  0x0100, /* 1.0 */
+  NULL,                       /* status variables                */
+  NULL,                       /* system variables                */
+  "1.0",                      /* string version                  */
+  PLUGIN_MATURITY_RELEASE,    /* maturity                        */
+  NULL                        /* config options                  */
+}
+maria_declare_plugin_end;
 
 #endif

=== modified file 'sql/log.cc'
--- a/sql/log.cc	2009-11-12 04:31:28 +0000
+++ b/sql/log.cc	2010-03-11 15:02:03 +0000
@@ -5795,3 +5795,21 @@
   NULL                        /* config options                  */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(binlog)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &binlog_storage_engine,
+  "binlog",
+  "MySQL AB",
+  "This is a pseudo storage engine to represent the binlog in a transaction",
+  PLUGIN_LICENSE_GPL,
+  binlog_init, /* Plugin Init */
+  NULL, /* Plugin Deinit */
+  0x0100 /* 1.0 */,
+  NULL,                       /* status variables                */
+  NULL,                       /* system variables                */
+  "1.0",                      /* string version */
+  PLUGIN_MATURITY_RELEASE,    /* maturity */
+  NULL                        /* config options                  */
+}
+maria_declare_plugin_end;

=== modified file 'sql/sql_builtin.cc.in'
--- a/sql/sql_builtin.cc.in	2006-12-31 01:29:11 +0000
+++ b/sql/sql_builtin.cc.in	2010-03-11 15:02:03 +0000
@@ -15,13 +15,12 @@
 
 #include <mysql/plugin.h>
 
-typedef struct st_mysql_plugin builtin_plugin[];
-
-extern builtin_plugin 
-  builtin_binlog_plugin@mysql_plugin_defs@;
-
-struct st_mysql_plugin *mysqld_builtins[]=
+typedef struct st_maria_plugin builtin_maria_plugin[];
+
+extern builtin_maria_plugin
+  builtin_maria_binlog_plugin@maria_plugin_defs@;
+
+struct st_maria_plugin *mariadb_builtins[]=
 {
-  builtin_binlog_plugin@mysql_plugin_defs@,(struct st_mysql_plugin *)0
+  builtin_maria_binlog_plugin@maria_plugin_defs@,(struct st_maria_plugin *)0
 };
-

=== modified file 'sql/sql_plugin.cc'
--- a/sql/sql_plugin.cc	2009-11-12 04:31:28 +0000
+++ b/sql/sql_plugin.cc	2010-03-11 15:02:03 +0000
@@ -27,7 +27,7 @@
 #define plugin_int_to_ref(A) &(A)
 #endif
 
-extern struct st_mysql_plugin *mysqld_builtins[];
+extern struct st_maria_plugin *mariadb_builtins[];
 
 /**
   @note The order of the enumeration is critical.
@@ -82,6 +82,14 @@
                    "_mysql_sizeof_struct_st_plugin_";
 static const char *plugin_declarations_sym= "_mysql_plugin_declarations_";
 static int min_plugin_interface_version= MYSQL_PLUGIN_INTERFACE_VERSION & ~0xFF;
+static const char *maria_plugin_interface_version_sym=
+                   "_maria_plugin_interface_version_";
+static const char *maria_sizeof_st_plugin_sym=
+                   "_maria_sizeof_struct_st_plugin_";
+static const char *maria_plugin_declarations_sym=
+                   "_maria_plugin_declarations_";
+static int min_maria_plugin_interface_version=
+                   MARIA_PLUGIN_INTERFACE_VERSION & ~0xFF;
 #endif
 
 /* Note that 'int version' must be the first field of every plugin
@@ -205,7 +213,7 @@
                              const char *list);
 static int test_plugin_options(MEM_ROOT *, struct st_plugin_int *,
                                int *, char **);
-static bool register_builtin(struct st_mysql_plugin *, struct st_plugin_int *,
+static bool register_builtin(struct st_maria_plugin *, struct st_plugin_int *,
                              struct st_plugin_int **);
 static void unlock_variables(THD *thd, struct system_variables *vars);
 static void cleanup_variables(THD *thd, struct system_variables *vars);
@@ -341,11 +349,261 @@
     dlclose(p->handle);
 #endif
   my_free(p->dl.str, MYF(MY_ALLOW_ZERO_PTR));
-  if (p->version != MYSQL_PLUGIN_INTERFACE_VERSION)
+  if (p->mariaversion != MARIA_PLUGIN_INTERFACE_VERSION)
     my_free((uchar*)p->plugins, MYF(MY_ALLOW_ZERO_PTR));
 }
 
 
+/**
+  Reads data from mysql plugin interface
+
+  @param plugin_dl       Structure where the data should be put
+  @param sym             Reverence on version info
+  @param dlpath          Path to the module
+  @param report          What errors should be reported
+
+  @retval FALSE OK
+  @retval TRUE  ERROR
+*/
+
+static my_bool read_mysql_plugin_info(struct st_plugin_dl *plugin_dl,
+                                      void *sym, char *dlpath,
+                                      int report)
+{
+  DBUG_ENTER("read_maria_plugin_info");
+  /* Determine interface version */
+  if (!sym)
+  {
+    free_plugin_mem(plugin_dl);
+    if (report & REPORT_TO_USER)
+      my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), plugin_interface_version_sym);
+    if (report & REPORT_TO_LOG)
+      sql_print_error(ER(ER_CANT_FIND_DL_ENTRY), plugin_interface_version_sym);
+    DBUG_RETURN(TRUE);
+  }
+  plugin_dl->mariaversion= 0;
+  plugin_dl->mysqlversion= *(int *)sym;
+  /* Versioning */
+  if (plugin_dl->mysqlversion < min_plugin_interface_version ||
+      (plugin_dl->mysqlversion >> 8) > (MYSQL_PLUGIN_INTERFACE_VERSION >> 8))
+  {
+    free_plugin_mem(plugin_dl);
+    if (report & REPORT_TO_USER)
+      my_error(ER_CANT_OPEN_LIBRARY, MYF(0), dlpath, 0,
+               "plugin interface version mismatch");
+    if (report & REPORT_TO_LOG)
+      sql_print_error(ER(ER_CANT_OPEN_LIBRARY), dlpath, 0,
+                      "plugin interface version mismatch");
+    DBUG_RETURN(TRUE);
+  }
+  /* Find plugin declarations */
+  if (!(sym= dlsym(plugin_dl->handle, plugin_declarations_sym)))
+  {
+    free_plugin_mem(plugin_dl);
+    if (report & REPORT_TO_USER)
+      my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), plugin_declarations_sym);
+    if (report & REPORT_TO_LOG)
+      sql_print_error(ER(ER_CANT_FIND_DL_ENTRY), plugin_declarations_sym);
+    DBUG_RETURN(TRUE);
+  }
+
+  /* convert mysql declaration to maria one */
+  {
+    int i;
+    uint sizeof_st_plugin;
+    struct st_mysql_plugin *old;
+    struct st_maria_plugin *cur;
+    char *ptr= (char *)sym;
+
+    if ((sym= dlsym(plugin_dl->handle, sizeof_st_plugin_sym)))
+      sizeof_st_plugin= *(int *)sym;
+    else
+    {
+#ifdef ERROR_ON_NO_SIZEOF_PLUGIN_SYMBOL
+      free_plugin_mem(plugin_dl);
+      if (report & REPORT_TO_USER)
+        my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), sizeof_st_plugin_sym);
+      if (report & REPORT_TO_LOG)
+        sql_print_error(ER(ER_CANT_FIND_DL_ENTRY), sizeof_st_plugin_sym);
+      DBUG_RETURN(TRUE);
+#else
+      /*
+        When the following assert starts failing, we'll have to switch
+        to the upper branch of the #ifdef
+      */
+      DBUG_ASSERT(min_plugin_interface_version == 0);
+      sizeof_st_plugin= (int)offsetof(struct st_mysql_plugin, version);
+#endif
+    }
+
+    for (i= 0;
+         ((struct st_mysql_plugin *)(ptr+i*sizeof_st_plugin))->info;
+         i++)
+      /* no op */;
+
+    cur= (struct st_maria_plugin*)
+          my_malloc(i * sizeof(struct st_maria_plugin),
+                    MYF(MY_ZEROFILL|MY_WME));
+    if (!cur)
+    {
+      free_plugin_mem(plugin_dl);
+      if (report & REPORT_TO_USER)
+        my_error(ER_OUTOFMEMORY, MYF(0), plugin_dl->dl.length);
+      if (report & REPORT_TO_LOG)
+        sql_print_error(ER(ER_OUTOFMEMORY), plugin_dl->dl.length);
+      DBUG_RETURN(TRUE);
+    }
+    /*
+      All st_plugin fields not initialized in the plugin explicitly, are
+      set to 0. It matches C standard behaviour for struct initializers that
+      have less values than the struct definition.
+    */
+    for (i=0;
+         (old=(struct st_mysql_plugin *)(ptr+i*sizeof_st_plugin))->info;
+         i++)
+    {
+
+      cur->type= old->type;
+      cur->info= old->info;
+      cur->name= old->name;
+      cur->author= old->author;
+      cur->descr= old->descr;
+      cur->license= old->license;
+      cur->init= old->init;
+      cur->deinit= old->deinit;
+      cur->version= old->version;
+      cur->status_vars= old->status_vars;
+      cur->system_vars= old->system_vars;
+      /*
+        Something like this should be added to process
+        new mysql plugin versions:
+        if (plugin_dl->mysqlversion > 0x0100)
+        {
+           cur->newfield= CONSTANT_MEANS_UNKNOWN;
+        }
+        else
+        {
+           cur->newfield= old->newfield;
+        }
+      */
+      /* Maria only fields */
+      cur->version_info= "Unknown";
+      cur->maturity= PLUGIN_MATURITY_UNKNOWN;
+    }
+
+    plugin_dl->plugins= (struct st_maria_plugin *)cur;
+  }
+
+  DBUG_RETURN(FALSE);
+}
+
+
+/**
+  Reads data from maria plugin interface
+
+  @param plugin_dl       Structure where the data should be put
+  @param sym             Reverence on version info
+  @param dlpath          Path to the module
+  @param report          what errors should be reported
+
+  @retval FALSE OK
+  @retval TRUE  ERROR
+*/
+
+static my_bool read_maria_plugin_info(struct st_plugin_dl *plugin_dl,
+                                      void *sym, char *dlpath,
+                                      int report)
+{
+  DBUG_ENTER("read_maria_plugin_info");
+
+  /* Determine interface version */
+  if (!(sym))
+  {
+    free_plugin_mem(plugin_dl);
+    if (report & REPORT_TO_USER)
+      my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), plugin_interface_version_sym);
+    if (report & REPORT_TO_LOG)
+      sql_print_error(ER(ER_CANT_FIND_DL_ENTRY), plugin_interface_version_sym);
+    DBUG_RETURN(TRUE);
+  }
+  plugin_dl->mariaversion= *(int *)sym;
+  plugin_dl->mysqlversion= 0;
+  /* Versioning */
+  if (plugin_dl->mariaversion < min_maria_plugin_interface_version ||
+      (plugin_dl->mariaversion >> 8) > (MARIA_PLUGIN_INTERFACE_VERSION >> 8))
+  {
+    free_plugin_mem(plugin_dl);
+    if (report & REPORT_TO_USER)
+      my_error(ER_CANT_OPEN_LIBRARY, MYF(0), dlpath, 0,
+               "plugin interface version mismatch");
+    if (report & REPORT_TO_LOG)
+      sql_print_error(ER(ER_CANT_OPEN_LIBRARY), dlpath, 0,
+                      "plugin interface version mismatch");
+    DBUG_RETURN(TRUE);
+  }
+  /* Find plugin declarations */
+  if (!(sym= dlsym(plugin_dl->handle, maria_plugin_declarations_sym)))
+  {
+    free_plugin_mem(plugin_dl);
+    if (report & REPORT_TO_USER)
+      my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), plugin_declarations_sym);
+    if (report & REPORT_TO_LOG)
+      sql_print_error(ER(ER_CANT_FIND_DL_ENTRY), plugin_declarations_sym);
+    DBUG_RETURN(TRUE);
+  }
+  if (plugin_dl->mariaversion != MARIA_PLUGIN_INTERFACE_VERSION)
+  {
+    int i;
+    uint sizeof_st_plugin;
+    struct st_maria_plugin *old, *cur;
+    char *ptr= (char *)sym;
+
+    if ((sym= dlsym(plugin_dl->handle, maria_sizeof_st_plugin_sym)))
+      sizeof_st_plugin= *(int *)sym;
+    else
+    {
+      free_plugin_mem(plugin_dl);
+      if (report & REPORT_TO_USER)
+        my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), sizeof_st_plugin_sym);
+      if (report & REPORT_TO_LOG)
+        sql_print_error(ER(ER_CANT_FIND_DL_ENTRY), sizeof_st_plugin_sym);
+      DBUG_RETURN(TRUE);
+    }
+
+    for (i= 0;
+         ((struct st_maria_plugin *)(ptr+i*sizeof_st_plugin))->info;
+         i++)
+      /* no op */;
+
+    cur= (struct st_maria_plugin*)
+          my_malloc(i * sizeof(struct st_maria_plugin),
+                    MYF(MY_ZEROFILL|MY_WME));
+    if (!cur)
+    {
+      free_plugin_mem(plugin_dl);
+      if (report & REPORT_TO_USER)
+        my_error(ER_OUTOFMEMORY, MYF(0), plugin_dl->dl.length);
+      if (report & REPORT_TO_LOG)
+        sql_print_error(ER(ER_OUTOFMEMORY), plugin_dl->dl.length);
+      DBUG_RETURN(TRUE);
+    }
+    /*
+      All st_plugin fields not initialized in the plugin explicitly, are
+      set to 0. It matches C standard behaviour for struct initializers that
+      have less values than the struct definition.
+    */
+    for (i=0;
+         (old=(struct st_maria_plugin *)(ptr+i*sizeof_st_plugin))->info;
+         i++)
+      memcpy(cur+i, old, min(sizeof(cur[i]), sizeof_st_plugin));
+
+    sym= cur;
+  }
+  plugin_dl->plugins= (struct st_maria_plugin *)sym;
+
+  DBUG_RETURN(FALSE);
+}
+
 static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
 {
 #ifdef HAVE_DLOPEN
@@ -399,98 +657,22 @@
       sql_print_error(ER(ER_CANT_OPEN_LIBRARY), dlpath, errno, errmsg);
     DBUG_RETURN(0);
   }
-  /* Determine interface version */
-  if (!(sym= dlsym(plugin_dl.handle, plugin_interface_version_sym)))
-  {
-    free_plugin_mem(&plugin_dl);
-    if (report & REPORT_TO_USER)
-      my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), plugin_interface_version_sym);
-    if (report & REPORT_TO_LOG)
-      sql_print_error(ER(ER_CANT_FIND_DL_ENTRY), plugin_interface_version_sym);
-    DBUG_RETURN(0);
-  }
-  plugin_dl.version= *(int *)sym;
-  /* Versioning */
-  if (plugin_dl.version < min_plugin_interface_version ||
-      (plugin_dl.version >> 8) > (MYSQL_PLUGIN_INTERFACE_VERSION >> 8))
-  {
-    free_plugin_mem(&plugin_dl);
-    if (report & REPORT_TO_USER)
-      my_error(ER_CANT_OPEN_LIBRARY, MYF(0), dlpath, 0,
-               "plugin interface version mismatch");
-    if (report & REPORT_TO_LOG)
-      sql_print_error(ER(ER_CANT_OPEN_LIBRARY), dlpath, 0,
-                      "plugin interface version mismatch");
-    DBUG_RETURN(0);
-  }
-  /* Find plugin declarations */
-  if (!(sym= dlsym(plugin_dl.handle, plugin_declarations_sym)))
-  {
-    free_plugin_mem(&plugin_dl);
-    if (report & REPORT_TO_USER)
-      my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), plugin_declarations_sym);
-    if (report & REPORT_TO_LOG)
-      sql_print_error(ER(ER_CANT_FIND_DL_ENTRY), plugin_declarations_sym);
-    DBUG_RETURN(0);
-  }
-
-  if (plugin_dl.version != MYSQL_PLUGIN_INTERFACE_VERSION)
-  {
-    int i;
-    uint sizeof_st_plugin;
-    struct st_mysql_plugin *old, *cur;
-    char *ptr= (char *)sym;
-
-    if ((sym= dlsym(plugin_dl.handle, sizeof_st_plugin_sym)))
-      sizeof_st_plugin= *(int *)sym;
-    else
-    {
-#ifdef ERROR_ON_NO_SIZEOF_PLUGIN_SYMBOL
-      free_plugin_mem(&plugin_dl);
-      if (report & REPORT_TO_USER)
-        my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), sizeof_st_plugin_sym);
-      if (report & REPORT_TO_LOG)
-        sql_print_error(ER(ER_CANT_FIND_DL_ENTRY), sizeof_st_plugin_sym);
-      DBUG_RETURN(0);
-#else
-      /*
-        When the following assert starts failing, we'll have to switch
-        to the upper branch of the #ifdef
-      */
-      DBUG_ASSERT(min_plugin_interface_version == 0);
-      sizeof_st_plugin= (int)offsetof(struct st_mysql_plugin, version);
-#endif
-    }
-
-    for (i= 0;
-         ((struct st_mysql_plugin *)(ptr+i*sizeof_st_plugin))->info;
-         i++)
-      /* no op */;
-
-    cur= (struct st_mysql_plugin*)
-          my_malloc(i*sizeof(struct st_mysql_plugin), MYF(MY_ZEROFILL|MY_WME));
-    if (!cur)
-    {
-      free_plugin_mem(&plugin_dl);
-      if (report & REPORT_TO_USER)
-        my_error(ER_OUTOFMEMORY, MYF(0), plugin_dl.dl.length);
-      if (report & REPORT_TO_LOG)
-        sql_print_error(ER(ER_OUTOFMEMORY), plugin_dl.dl.length);
-      DBUG_RETURN(0);
-    }
-    /*
-      All st_plugin fields not initialized in the plugin explicitly, are
-      set to 0. It matches C standard behaviour for struct initializers that
-      have less values than the struct definition.
-    */
-    for (i=0;
-         (old=(struct st_mysql_plugin *)(ptr+i*sizeof_st_plugin))->info;
-         i++)
-      memcpy(cur+i, old, min(sizeof(cur[i]), sizeof_st_plugin));
-
-    sym= cur;
-  }
-  plugin_dl.plugins= (struct st_mysql_plugin *)sym;
+
+  /* Checks which plugin interface present and reads info */
+  if (!(sym= dlsym(plugin_dl.handle, maria_plugin_interface_version_sym)))
+  {
+    if (read_mysql_plugin_info(&plugin_dl,
+                               dlsym(plugin_dl.handle,
+                                     plugin_interface_version_sym),
+                               dlpath,
+                               report))
+      DBUG_RETURN(0);
+  }
+  else
+  {
+    if (read_maria_plugin_info(&plugin_dl, sym, dlpath, report))
+      DBUG_RETURN(0);
+  }
 
   /* Duplicate and convert dll name */
   plugin_dl.dl.length= dl->length * files_charset_info->mbmaxlen + 1;
@@ -718,7 +900,7 @@
                        int *argc, char **argv, int report)
 {
   struct st_plugin_int tmp;
-  struct st_mysql_plugin *plugin;
+  struct st_maria_plugin *plugin;
   DBUG_ENTER("plugin_add");
   if (plugin_find_internal(name, MYSQL_ANY_PLUGIN))
   {
@@ -1120,8 +1302,8 @@
 {
   uint i;
   bool is_myisam;
-  struct st_mysql_plugin **builtins;
-  struct st_mysql_plugin *plugin;
+  struct st_maria_plugin **builtins;
+  struct st_maria_plugin *plugin;
   struct st_plugin_int tmp, *plugin_ptr, **reap;
   MEM_ROOT tmp_root;
   bool reaped_mandatory_plugin= FALSE;
@@ -1160,7 +1342,7 @@
   /*
     First we register builtin plugins
   */
-  for (builtins= mysqld_builtins; *builtins; builtins++)
+  for (builtins= mariadb_builtins; *builtins; builtins++)
   {
     for (plugin= *builtins; plugin->info; plugin++)
     {
@@ -1290,7 +1472,7 @@
 }
 
 
-static bool register_builtin(struct st_mysql_plugin *plugin,
+static bool register_builtin(struct st_maria_plugin *plugin,
                              struct st_plugin_int *tmp,
                              struct st_plugin_int **ptr)
 {
@@ -1326,7 +1508,7 @@
   RETURN
     false - plugin registered successfully
 */
-bool plugin_register_builtin(THD *thd, struct st_mysql_plugin *plugin)
+bool plugin_register_builtin(THD *thd, struct st_maria_plugin *plugin)
 {
   struct st_plugin_int tmp, *ptr;
   bool result= true;
@@ -1455,7 +1637,7 @@
   char buffer[FN_REFLEN];
   LEX_STRING name= {buffer, 0}, dl= {NULL, 0}, *str= &name;
   struct st_plugin_dl *plugin_dl;
-  struct st_mysql_plugin *plugin;
+  struct st_maria_plugin *plugin;
   char *p= buffer;
   DBUG_ENTER("plugin_load_list");
   while (list)

=== modified file 'sql/sql_plugin.h'
--- a/sql/sql_plugin.h	2009-05-14 12:03:33 +0000
+++ b/sql/sql_plugin.h	2010-03-11 15:02:03 +0000
@@ -62,8 +62,9 @@
 {
   LEX_STRING dl;
   void *handle;
-  struct st_mysql_plugin *plugins;
-  int version;
+  struct st_maria_plugin *plugins;
+  int mysqlversion;
+  int mariaversion;
   uint ref_count;            /* number of plugins loaded from the library */
 };
 
@@ -72,7 +73,7 @@
 struct st_plugin_int
 {
   LEX_STRING name;
-  struct st_mysql_plugin *plugin;
+  struct st_maria_plugin *plugin;
   struct st_plugin_dl *plugin_dl;
   uint state;
   uint ref_count;               /* number of threads using the plugin */

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2009-11-12 04:31:28 +0000
+++ b/sql/sql_show.cc	2010-03-11 15:02:03 +0000
@@ -94,11 +94,19 @@
   return my_snprintf(buf, buf_length, "%d.%d", version>>8,version&0xff);
 }
 
+static const LEX_STRING maturity_name[]={
+  { C_STRING_WITH_LEN(PLUGIN_MATURITY_UNKNOWN_STR) },
+  { C_STRING_WITH_LEN(PLUGIN_MATURITY_TEST_STR) },
+  { C_STRING_WITH_LEN(PLUGIN_MATURITY_ALPHA_STR) },
+  { C_STRING_WITH_LEN(PLUGIN_MATURITY_BETA_STR) },
+  { C_STRING_WITH_LEN(PLUGIN_MATURITY_GAMMA_STR) },
+  { C_STRING_WITH_LEN(PLUGIN_MATURITY_RELEASE_STR) }};
+
 static my_bool show_plugins(THD *thd, plugin_ref plugin,
                             void *arg)
 {
   TABLE *table= (TABLE*) arg;
-  struct st_mysql_plugin *plug= plugin_decl(plugin);
+  struct st_maria_plugin *plug= plugin_decl(plugin);
   struct st_plugin_dl *plugin_dl= plugin_dlib(plugin);
   CHARSET_INFO *cs= system_charset_info;
   char version_buf[20];
@@ -143,7 +151,9 @@
     table->field[5]->set_notnull();
     table->field[6]->store(version_buf,
           make_version_string(version_buf, sizeof(version_buf),
-                              plugin_dl->version),
+                              (plugin_dl->mariaversion ?
+                               plugin_dl->mariaversion :
+                               plugin_dl->mysqlversion)),
           cs);
     table->field[6]->set_notnull();
   }
@@ -186,6 +196,26 @@
   }
   table->field[9]->set_notnull();
 
+  if ((uint) plug->maturity <= PLUGIN_MATURITY_RELEASE)
+     table->field[10]->store(maturity_name[plug->maturity].str,
+                             maturity_name[plug->maturity].length,
+                             cs);
+   else
+   {
+     DBUG_ASSERT(0);
+     table->field[10]->store("Unknown", 7, cs);
+   }
+   table->field[10]->set_notnull();
+
+  if (plug->version_info)
+  {
+    table->field[11]->store(plug->version_info,
+                            strlen(plug->version_info), cs);
+    table->field[11]->set_notnull();
+  }
+  else
+    table->field[11]->set_null();
+
   return schema_table_store_record(thd, table);
 }
 
@@ -4293,7 +4323,7 @@
   if (plugin_state(plugin) != PLUGIN_IS_READY)
   {
 
-    struct st_mysql_plugin *plug= plugin_decl(plugin);
+    struct st_maria_plugin *plug= plugin_decl(plugin);
     if (!(wild && wild[0] &&
           wild_case_compare(scs, plug->name,wild)))
     {
@@ -6990,6 +7020,8 @@
   {"PLUGIN_AUTHOR", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
   {"PLUGIN_DESCRIPTION", 65535, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
   {"PLUGIN_LICENSE", 80, MYSQL_TYPE_STRING, 0, 1, "License", SKIP_OPEN_TABLE},
+  {"PLUGIN_MATURITY", 7, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
+  {"PLUGIN_AUTH_VERSION", 80, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
 };
 

=== modified file 'storage/archive/ha_archive.cc'
--- a/storage/archive/ha_archive.cc	2009-09-07 20:50:10 +0000
+++ b/storage/archive/ha_archive.cc	2010-03-11 15:02:03 +0000
@@ -1642,4 +1642,22 @@
   NULL                        /* config options                  */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(archive)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &archive_storage_engine,
+  "ARCHIVE",
+  "Brian Aker, MySQL AB",
+  "Archive storage engine",
+  PLUGIN_LICENSE_GPL,
+  archive_db_init, /* Plugin Init */
+  archive_db_done, /* Plugin Deinit */
+  0x0300 /* 3.0 */,
+  NULL,                       /* status variables                */
+  NULL,                       /* system variables                */
+  "1.0",                      /* string version */
+  PLUGIN_MATURITY_RELEASE,    /* maturity */
+  NULL                        /* config options                  */
+}
+maria_declare_plugin_end;
 

=== modified file 'storage/blackhole/ha_blackhole.cc'
--- a/storage/blackhole/ha_blackhole.cc	2008-11-10 20:21:49 +0000
+++ b/storage/blackhole/ha_blackhole.cc	2010-03-11 15:02:03 +0000
@@ -369,3 +369,21 @@
   NULL                        /* config options                  */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(blackhole)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &blackhole_storage_engine,
+  "BLACKHOLE",
+  "MySQL AB",
+  "/dev/null storage engine (anything you write to it disappears)",
+  PLUGIN_LICENSE_GPL,
+  blackhole_init, /* Plugin Init */
+  blackhole_fini, /* Plugin Deinit */
+  0x0100 /* 1.0 */,
+  NULL,                       /* status variables                */
+  NULL,                       /* system variables                */
+  "1.0",                      /* string version */
+  PLUGIN_MATURITY_RELEASE,    /* maturity */
+  NULL                        /* config options                  */
+}
+maria_declare_plugin_end;

=== modified file 'storage/csv/ha_tina.cc'
--- a/storage/csv/ha_tina.cc	2009-04-25 10:05:32 +0000
+++ b/storage/csv/ha_tina.cc	2010-03-11 15:02:03 +0000
@@ -1636,4 +1636,21 @@
   NULL                        /* config options                  */
 }
 mysql_declare_plugin_end;
-
+maria_declare_plugin(csv)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &csv_storage_engine,
+  "CSV",
+  "Brian Aker, MySQL AB",
+  "CSV storage engine",
+  PLUGIN_LICENSE_GPL,
+  tina_init_func, /* Plugin Init */
+  tina_done_func, /* Plugin Deinit */
+  0x0100 /* 1.0 */,
+  NULL,                       /* status variables                */
+  NULL,                       /* system variables                */
+  "1.0",                      /* string version */
+  PLUGIN_MATURITY_RELEASE,    /* maturity */
+  NULL                        /* config options                  */
+}
+maria_declare_plugin_end;

=== modified file 'storage/example/ha_example.cc'
--- a/storage/example/ha_example.cc	2008-02-24 13:12:17 +0000
+++ b/storage/example/ha_example.cc	2010-03-11 15:02:03 +0000
@@ -906,3 +906,21 @@
   NULL                                          /* config options */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(example)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &example_storage_engine,
+  "EXAMPLE",
+  "Brian Aker, MySQL AB",
+  "Example storage engine",
+  PLUGIN_LICENSE_GPL,
+  example_init_func,                            /* Plugin Init */
+  example_done_func,                            /* Plugin Deinit */
+  0x0001 /* 0.1 */,
+  NULL,                                         /* status variables */
+  example_system_variables,                     /* system variables */
+  "0.1",                                        /* string version */
+  PLUGIN_MATURITY_TEST,                         /* maturity */
+  NULL                                          /* config options */
+}
+maria_declare_plugin_end;

=== modified file 'storage/federated/ha_federated.cc'
--- a/storage/federated/ha_federated.cc	2009-09-07 20:50:10 +0000
+++ b/storage/federated/ha_federated.cc	2010-03-11 15:02:03 +0000
@@ -3379,3 +3379,21 @@
   NULL                        /* config options                  */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(federated)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &federated_storage_engine,
+  "FEDERATED",
+  "Patrick Galbraith and Brian Aker, MySQL AB",
+  "Federated MySQL storage engine",
+  PLUGIN_LICENSE_GPL,
+  federated_db_init, /* Plugin Init */
+  federated_done, /* Plugin Deinit */
+  0x0100 /* 1.0 */,
+  NULL,                       /* status variables                */
+  NULL,                       /* system variables                */
+  "1.0",                      /* string version */
+  PLUGIN_MATURITY_BETA,       /* maturity */
+  NULL                        /* config options                  */
+}
+maria_declare_plugin_end;

=== modified file 'storage/federatedx/ha_federatedx.cc'
--- a/storage/federatedx/ha_federatedx.cc	2009-11-03 11:08:09 +0000
+++ b/storage/federatedx/ha_federatedx.cc	2010-03-11 15:02:03 +0000
@@ -3485,9 +3485,27 @@
   PLUGIN_LICENSE_GPL,
   federatedx_db_init, /* Plugin Init */
   federatedx_done, /* Plugin Deinit */
-  0x0100 /* 1.0 */,
+  0x0200 /* 2.0 */,
   NULL,                       /* status variables                */
   NULL,                       /* system variables                */
   NULL                        /* config options                  */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(federated)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &federatedx_storage_engine,
+  "FEDERATED",
+  "Patrick Galbraith",
+  "FederatedX pluggable storage engine",
+  PLUGIN_LICENSE_GPL,
+  federatedx_db_init, /* Plugin Init */
+  federatedx_done, /* Plugin Deinit */
+  0x0200 /* 2.0 */,
+  NULL,                       /* status variables                */
+  NULL,                       /* system variables                */
+  "2.0",                      /* string version */
+  PLUGIN_MATURITY_BETA,       /* maturity */
+  NULL                        /* config options                  */
+}
+maria_declare_plugin_end;

=== modified file 'storage/heap/ha_heap.cc'
--- a/storage/heap/ha_heap.cc	2009-09-07 20:50:10 +0000
+++ b/storage/heap/ha_heap.cc	2010-03-11 15:02:03 +0000
@@ -767,3 +767,21 @@
   NULL                        /* config options                  */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(heap)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &heap_storage_engine,
+  "MEMORY",
+  "MySQL AB",
+  "Hash based, stored in memory, useful for temporary tables",
+  PLUGIN_LICENSE_GPL,
+  heap_init,
+  NULL,
+  0x0100, /* 1.0 */
+  NULL,                       /* status variables                */
+  NULL,                       /* system variables                */
+  "1.0",                      /* string version */
+  PLUGIN_MATURITY_RELEASE,    /* maturity */
+  NULL                        /* config options                  */
+}
+maria_declare_plugin_end;

=== modified file 'storage/ibmdb2i/ha_ibmdb2i.cc'
--- a/storage/ibmdb2i/ha_ibmdb2i.cc	2009-07-08 09:10:01 +0000
+++ b/storage/ibmdb2i/ha_ibmdb2i.cc	2010-03-11 15:02:03 +0000
@@ -3357,3 +3357,21 @@
   NULL                                          /* config options */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(ibmdb2i)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &ibmdb2i_storage_engine,
+  "IBMDB2I",
+  "The IBM development team in Rochester, Minnesota",
+  "IBM DB2 for i Storage Engine",
+  PLUGIN_LICENSE_GPL,
+  ibmdb2i_init_func,          /* Plugin Init */
+  ibmdb2i_done_func,          /* Plugin Deinit */
+  0x0100 /* 1.0 */,
+  NULL,                       /* status variables */
+  ibmdb2i_system_variables,   /* system variables */
+  "1.0",                      /* string version */
+  PLUGIN_MATURITY_UNKNOWN,    /* maturity */
+  NULL                        /* config options */
+}
+maria_declare_plugin_end;

=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc	2009-10-16 22:57:48 +0000
+++ b/storage/innobase/handler/ha_innodb.cc	2010-03-11 15:02:03 +0000
@@ -8684,6 +8684,24 @@
   NULL /* reserved */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(innobase)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &innobase_storage_engine,
+  innobase_hton_name,
+  "Innobase OY",
+  "Supports transactions, row-level locking, and foreign keys",
+  PLUGIN_LICENSE_GPL,
+  innobase_init, /* Plugin Init */
+  NULL, /* Plugin Deinit */
+  0x0100 /* 1.0 */,
+  innodb_status_variables_export,/* status variables             */
+  innobase_system_variables, /* system variables */
+  "1.0",                      /* string version */
+  PLUGIN_MATURITY_RELEASE,    /* maturity */
+  NULL /* reserved */
+}
+maria_declare_plugin_end;
 
 /** @brief Initialize the default value of innodb_commit_concurrency.
 

=== modified file 'storage/innodb_plugin/handler/i_s.cc'
--- a/storage/innodb_plugin/handler/i_s.cc	2009-08-14 15:18:52 +0000
+++ b/storage/innodb_plugin/handler/i_s.cc	2010-03-11 15:02:03 +0000
@@ -455,6 +455,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_trx_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_TRX"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "InnoDB transactions"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, innodb_trx_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_locks */
 static ST_FIELD_INFO	innodb_locks_fields_info[] =
 {
@@ -730,6 +787,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_locks_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_LOCKS"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "InnoDB conflicting locks"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, innodb_locks_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */
 static ST_FIELD_INFO	innodb_lock_waits_fields_info[] =
 {
@@ -913,6 +1027,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_lock_waits_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_LOCK_WAITS"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, "Innobase Oy"),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "InnoDB which lock is blocking which"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, innodb_lock_waits_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 /*******************************************************************//**
 Common function to fill any of the dynamic tables:
 INFORMATION_SCHEMA.innodb_trx
@@ -1245,6 +1416,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_mysql_plugin	i_s_innodb_cmp_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_CMP"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "Statistics for the InnoDB compression"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, i_s_cmp_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 UNIV_INTERN struct st_mysql_plugin	i_s_innodb_cmp_reset =
 {
 	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
@@ -1295,6 +1523,64 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_cmp_reset_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_CMP_RESET"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "Statistics for the InnoDB compression;"
+		   " reset cumulated counts"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, i_s_cmp_reset_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 /* Fields of the dynamic table information_schema.innodb_cmpmem. */
 static ST_FIELD_INFO	i_s_cmpmem_fields_info[] =
 {
@@ -1511,6 +1797,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_cmpmem_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_CMPMEM"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "Statistics for the InnoDB compressed buffer pool"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, i_s_cmpmem_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 UNIV_INTERN struct st_mysql_plugin	i_s_innodb_cmpmem_reset =
 {
 	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
@@ -1561,6 +1904,64 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_cmpmem_reset_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_CMPMEM_RESET"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "Statistics for the InnoDB compressed buffer pool;"
+		   " reset cumulated counts"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, i_s_cmpmem_reset_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 /*******************************************************************//**
 Unbind a dynamic INFORMATION_SCHEMA table.
 @return	0 on success */

=== modified file 'storage/maria/ha_maria.cc'
--- a/storage/maria/ha_maria.cc	2009-10-26 11:35:42 +0000
+++ b/storage/maria/ha_maria.cc	2010-03-11 15:02:03 +0000
@@ -3346,9 +3346,27 @@
   PLUGIN_LICENSE_GPL,
   ha_maria_init,              /* Plugin Init                     */
   NULL,                       /* Plugin Deinit                   */
-  0x0100,                     /* 1.0                             */
+  0x0105,                     /* 1.5                             */
   status_variables,           /* status variables                */
   system_variables,           /* system variables                */
   NULL
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(maria)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &maria_storage_engine,
+  "MARIA",
+  "MySQL AB",
+  "Crash-safe tables with MyISAM heritage",
+  PLUGIN_LICENSE_GPL,
+  ha_maria_init,              /* Plugin Init                     */
+  NULL,                       /* Plugin Deinit                   */
+  0x0105,                     /* 1.5                             */
+  status_variables,           /* status variables                */
+  system_variables,           /* system variables                */
+  "1.5",                      /* string version */
+  PLUGIN_MATURITY_GAMMA,      /* maturity */
+  NULL
+}
+maria_declare_plugin_end;

=== modified file 'storage/myisam/ha_myisam.cc'
--- a/storage/myisam/ha_myisam.cc	2009-10-17 19:12:28 +0000
+++ b/storage/myisam/ha_myisam.cc	2010-03-11 15:02:03 +0000
@@ -2183,6 +2183,24 @@
   NULL                        /* config options                  */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(myisam)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &myisam_storage_engine,
+  "MyISAM",
+  "MySQL AB",
+  "Default engine as of MySQL 3.23 with great performance",
+  PLUGIN_LICENSE_GPL,
+  myisam_init, /* Plugin Init */
+  NULL, /* Plugin Deinit */
+  0x0100, /* 1.0 */
+  NULL,                       /* status variables                */
+  NULL,                       /* system variables                */
+  "1.0",                      /* string version */
+  PLUGIN_MATURITY_RELEASE,    /* maturity */
+  NULL                        /* config options                  */
+}
+maria_declare_plugin_end;
 
 
 #ifdef HAVE_QUERY_CACHE

=== modified file 'storage/myisammrg/ha_myisammrg.cc'
--- a/storage/myisammrg/ha_myisammrg.cc	2009-10-15 21:38:29 +0000
+++ b/storage/myisammrg/ha_myisammrg.cc	2010-03-11 15:02:03 +0000
@@ -1289,3 +1289,21 @@
   NULL                        /* config options                  */
 }
 mysql_declare_plugin_end;
+maria_declare_plugin(myisammrg)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &myisammrg_storage_engine,
+  "MRG_MYISAM",
+  "MySQL AB",
+  "Collection of identical MyISAM tables",
+  PLUGIN_LICENSE_GPL,
+  myisammrg_init, /* Plugin Init */
+  NULL, /* Plugin Deinit */
+  0x0100, /* 1.0 */
+  NULL,                       /* status variables                */
+  NULL,                       /* system variables                */
+  "1.0",                      /* string version */
+  PLUGIN_MATURITY_RELEASE,    /* maturity */
+  NULL                        /* config options                  */
+}
+maria_declare_plugin_end;

=== modified file 'storage/pbxt/src/ha_pbxt.cc'
--- a/storage/pbxt/src/ha_pbxt.cc	2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/ha_pbxt.cc	2010-03-11 15:02:03 +0000
@@ -5507,6 +5507,42 @@
 drizzle_declare_plugin_end;
 #else
 mysql_declare_plugin_end;
+#ifdef MARIADB_BASE_VERSION
+maria_declare_plugin(pbxt)
+{ /* PBXT */
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &pbxt_storage_engine,
+  "PBXT",
+  "Paul McCullagh, PrimeBase Technologies GmbH",
+  "High performance, multi-versioning transactional engine",
+  PLUGIN_LICENSE_GPL,
+  pbxt_init, /* Plugin Init */
+  pbxt_end, /* Plugin Deinit */
+  0x0001 /* 0.1 */,
+  NULL,			      /* status variables */
+  pbxt_system_variables,      /* system variables */
+  "1.0.09g RC3",              /* string version */
+  PLUGIN_MATURITY_GAMMA,      /* maturity */
+  NULL			      /* config options */
+},
+{ /* PBXT_STATISTICS */
+  MYSQL_INFORMATION_SCHEMA_PLUGIN,
+  &pbxt_statitics,
+  "PBXT_STATISTICS",
+  "Paul McCullagh, PrimeBase Technologies GmbH",
+  "PBXT internal system statitics",
+  PLUGIN_LICENSE_GPL,
+  pbxt_init_statitics,	      /* plugin init */
+  pbxt_exit_statitics,	      /* plugin deinit */
+  0x0005,
+  NULL,			      /* status variables */
+  NULL,			      /* system variables */
+  "1.0.09g RC3",              /* string version */
+  PLUGIN_MATURITY_GAMMA,      /* maturity */
+  NULL			      /* config options */
+}
+maria_declare_plugin_end;
+#endif
 #endif
 
 #if defined(XT_WIN) && defined(XT_COREDUMP)

=== modified file 'storage/xtradb/handler/ha_innodb.cc'
--- a/storage/xtradb/handler/ha_innodb.cc	2009-10-16 22:57:48 +0000
+++ b/storage/xtradb/handler/ha_innodb.cc	2010-03-11 15:02:03 +0000
@@ -10540,6 +10540,39 @@
 i_s_innodb_index_stats,
 i_s_innodb_patches
 mysql_declare_plugin_end;
+maria_declare_plugin(innobase)
+{ /* InnoDB */
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &innobase_storage_engine,
+  innobase_hton_name,
+  "Innobase Oy",
+  "Supports transactions, row-level locking, and foreign keys",
+  PLUGIN_LICENSE_GPL,
+  innobase_init, /* Plugin Init */
+  NULL, /* Plugin Deinit */
+  INNODB_VERSION_SHORT,
+  innodb_status_variables_export,/* status variables             */
+  innobase_system_variables, /* system variables */
+  INNODB_VERSION_STR,         /* string version */
+  PLUGIN_MATURITY_RELEASE,    /* maturity */
+  NULL /* reserved */
+},
+i_s_innodb_rseg_maria,
+i_s_innodb_buffer_pool_pages_maria,
+i_s_innodb_buffer_pool_pages_index_maria,
+i_s_innodb_buffer_pool_pages_blob_maria,
+i_s_innodb_trx_maria,
+i_s_innodb_locks_maria,
+i_s_innodb_lock_waits_maria,
+i_s_innodb_cmp_maria,
+i_s_innodb_cmp_reset_maria,
+i_s_innodb_cmpmem_maria,
+i_s_innodb_cmpmem_reset_maria,
+i_s_innodb_table_stats_maria,
+i_s_innodb_index_stats_maria,
+i_s_innodb_patches_maria
+maria_declare_plugin_end;
+
 
 /** @brief Initialize the default value of innodb_commit_concurrency.
 

=== modified file 'storage/xtradb/handler/i_s.cc'
--- a/storage/xtradb/handler/i_s.cc	2009-09-15 10:46:35 +0000
+++ b/storage/xtradb/handler/i_s.cc	2010-03-11 15:02:03 +0000
@@ -390,6 +390,63 @@
         STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin      i_s_innodb_patches_maria =
+{
+        /* the plugin type (a MYSQL_XXX_PLUGIN value) */
+        /* int */
+        STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+        /* pointer to type-specific plugin descriptor */
+        /* void* */
+        STRUCT_FLD(info, &i_s_info),
+
+        /* plugin name */
+        /* const char* */
+        STRUCT_FLD(name, "XTRADB_ENHANCEMENTS"),
+
+        /* plugin author (for SHOW PLUGINS) */
+        /* const char* */
+        STRUCT_FLD(author, "Percona"),
+
+        /* general descriptive text (for SHOW PLUGINS) */
+        /* const char* */
+        STRUCT_FLD(descr, "Enhancements applied to InnoDB plugin"),
+
+        /* the plugin license (PLUGIN_LICENSE_XXX) */
+        /* int */
+        STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+        /* the function to invoke when plugin is loaded */
+        /* int (*)(void*); */
+        STRUCT_FLD(init, innodb_patches_init),
+
+        /* the function to invoke when plugin is unloaded */
+        /* int (*)(void*); */
+        STRUCT_FLD(deinit, i_s_common_deinit),
+
+        /* plugin version (for SHOW PLUGINS) */
+        /* unsigned int */
+        STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+        /* struct st_mysql_show_var* */
+        STRUCT_FLD(status_vars, NULL),
+
+        /* struct st_mysql_sys_var** */
+        STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+        /* reserved for dependency checking */
+        /* void* */
+        STRUCT_FLD(__reserved1, NULL)
+};
+
 
 static ST_FIELD_INFO	i_s_innodb_buffer_pool_pages_fields_info[] =
 {
@@ -1037,6 +1094,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_buffer_pool_pages_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_BUFFER_POOL_PAGES"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "InnoDB buffer pool pages"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, i_s_innodb_buffer_pool_pages_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, 0x0100 /* 1.0 */),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 UNIV_INTERN struct st_mysql_plugin	i_s_innodb_buffer_pool_pages_index =
 {
 	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
@@ -1086,6 +1200,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_buffer_pool_pages_index_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_BUFFER_POOL_PAGES_INDEX"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "InnoDB buffer pool index pages"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, i_s_innodb_buffer_pool_pages_index_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, 0x0100 /* 1.0 */),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 UNIV_INTERN struct st_mysql_plugin	i_s_innodb_buffer_pool_pages_blob =
 {
 	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
@@ -1135,6 +1306,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_buffer_pool_pages_blob_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_BUFFER_POOL_PAGES_BLOB"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "InnoDB buffer pool blob pages"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, i_s_innodb_buffer_pool_pages_blob_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, 0x0100 /* 1.0 */),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 
 /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_trx */
 static ST_FIELD_INFO	innodb_trx_fields_info[] =
@@ -1370,6 +1598,64 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_trx_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_TRX"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "InnoDB transactions"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, innodb_trx_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_locks */
 static ST_FIELD_INFO	innodb_locks_fields_info[] =
 {
@@ -1645,6 +1931,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_locks_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_LOCKS"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "InnoDB conflicting locks"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, innodb_locks_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */
 static ST_FIELD_INFO	innodb_lock_waits_fields_info[] =
 {
@@ -1828,6 +2171,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_lock_waits_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_LOCK_WAITS"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, "Innobase Oy"),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "InnoDB which lock is blocking which"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, innodb_lock_waits_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 /***********************************************************************
 Common function to fill any of the dynamic tables:
 INFORMATION_SCHEMA.innodb_trx
@@ -2160,6 +2560,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_cmp_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_CMP"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "Statistics for the InnoDB compression"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, i_s_cmp_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 UNIV_INTERN struct st_mysql_plugin	i_s_innodb_cmp_reset =
 {
 	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
@@ -2210,6 +2667,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_cmp_reset_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_CMP_RESET"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "Statistics for the InnoDB compression;"
+		   " reset cumulated counts"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, i_s_cmp_reset_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
 /* Fields of the dynamic table information_schema.innodb_cmpmem. */
 static ST_FIELD_INFO	i_s_cmpmem_fields_info[] =
 {
@@ -2428,6 +2942,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_cmpmem_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_CMPMEM"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "Statistics for the InnoDB compressed buffer pool"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, i_s_cmpmem_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 UNIV_INTERN struct st_mysql_plugin	i_s_innodb_cmpmem_reset =
 {
 	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
@@ -2478,6 +3049,64 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_cmpmem_reset_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_CMPMEM_RESET"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "Statistics for the InnoDB compressed buffer pool;"
+		   " reset cumulated counts"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, i_s_cmpmem_reset_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, INNODB_VERSION_SHORT),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 /***********************************************************************
 Unbind a dynamic INFORMATION_SCHEMA table. */
 static
@@ -2657,6 +3286,63 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_rseg_maria =
+{
+	/* the plugin type (a MYSQL_XXX_PLUGIN value) */
+	/* int */
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+
+	/* pointer to type-specific plugin descriptor */
+	/* void* */
+	STRUCT_FLD(info, &i_s_info),
+
+	/* plugin name */
+	/* const char* */
+	STRUCT_FLD(name, "INNODB_RSEG"),
+
+	/* plugin author (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(author, plugin_author),
+
+	/* general descriptive text (for SHOW PLUGINS) */
+	/* const char* */
+	STRUCT_FLD(descr, "InnoDB rollback segment information"),
+
+	/* the plugin license (PLUGIN_LICENSE_XXX) */
+	/* int */
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+
+	/* the function to invoke when plugin is loaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(init, i_s_innodb_rseg_init),
+
+	/* the function to invoke when plugin is unloaded */
+	/* int (*)(void*); */
+	STRUCT_FLD(deinit, i_s_common_deinit),
+
+	/* plugin version (for SHOW PLUGINS) */
+	/* unsigned int */
+	STRUCT_FLD(version, 0x0100 /* 1.0 */),
+
+	/* struct st_mysql_show_var* */
+	STRUCT_FLD(status_vars, NULL),
+
+	/* struct st_mysql_sys_var** */
+	STRUCT_FLD(system_vars, NULL),
+
+        /* string version */
+        /* const char * */
+        STRUCT_FLD(version_info, "1.0"),
+
+        /* Maturity */
+        /* int */
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+
+	/* reserved for dependency checking */
+	/* void* */
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 /***********************************************************************
 */
 static ST_FIELD_INFO	i_s_innodb_table_stats_info[] =
@@ -2937,6 +3623,24 @@
 	STRUCT_FLD(__reserved1, NULL)
 };
 
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_table_stats_maria =
+{
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+	STRUCT_FLD(info, &i_s_info),
+	STRUCT_FLD(name, "INNODB_TABLE_STATS"),
+	STRUCT_FLD(author, plugin_author),
+	STRUCT_FLD(descr, "InnoDB table statistics in memory"),
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+	STRUCT_FLD(init, i_s_innodb_table_stats_init),
+	STRUCT_FLD(deinit, i_s_common_deinit),
+	STRUCT_FLD(version, 0x0100 /* 1.0 */),
+	STRUCT_FLD(status_vars, NULL),
+	STRUCT_FLD(system_vars, NULL),
+        STRUCT_FLD(version_info, "1.0"),
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+	STRUCT_FLD(__reserved1, NULL)
+};
+
 UNIV_INTERN struct st_mysql_plugin	i_s_innodb_index_stats =
 {
 	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
@@ -2952,3 +3656,21 @@
 	STRUCT_FLD(system_vars, NULL),
 	STRUCT_FLD(__reserved1, NULL)
 };
+
+UNIV_INTERN struct st_maria_plugin	i_s_innodb_index_stats_maria =
+{
+	STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
+	STRUCT_FLD(info, &i_s_info),
+	STRUCT_FLD(name, "INNODB_INDEX_STATS"),
+	STRUCT_FLD(author, plugin_author),
+	STRUCT_FLD(descr, "InnoDB index statistics in memory"),
+	STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
+	STRUCT_FLD(init, i_s_innodb_index_stats_init),
+	STRUCT_FLD(deinit, i_s_common_deinit),
+	STRUCT_FLD(version, 0x0100 /* 1.0 */),
+	STRUCT_FLD(status_vars, NULL),
+	STRUCT_FLD(system_vars, NULL),
+        STRUCT_FLD(version_info, "1.0"),
+        STRUCT_FLD(maturity, PLUGIN_MATURITY_RELEASE),
+	STRUCT_FLD(__reserved1, NULL)
+};

=== modified file 'storage/xtradb/handler/i_s.h'
--- a/storage/xtradb/handler/i_s.h	2009-06-25 01:43:25 +0000
+++ b/storage/xtradb/handler/i_s.h	2010-03-11 15:02:03 +0000
@@ -40,4 +40,19 @@
 extern struct st_mysql_plugin	i_s_innodb_table_stats;
 extern struct st_mysql_plugin	i_s_innodb_index_stats;
 
+extern struct st_maria_plugin i_s_innodb_buffer_pool_pages_maria;
+extern struct st_maria_plugin i_s_innodb_buffer_pool_pages_index_maria;
+extern struct st_maria_plugin i_s_innodb_buffer_pool_pages_blob_maria;
+extern struct st_maria_plugin i_s_innodb_trx_maria;
+extern struct st_maria_plugin i_s_innodb_locks_maria;
+extern struct st_maria_plugin i_s_innodb_lock_waits_maria;
+extern struct st_maria_plugin i_s_innodb_cmp_maria;
+extern struct st_maria_plugin i_s_innodb_cmp_reset_maria;
+extern struct st_maria_plugin i_s_innodb_cmpmem_maria;
+extern struct st_maria_plugin i_s_innodb_cmpmem_reset_maria;
+extern struct st_maria_plugin i_s_innodb_patches_maria;
+extern struct st_maria_plugin i_s_innodb_rseg_maria;
+extern struct st_maria_plugin i_s_innodb_table_stats_maria;
+extern struct st_maria_plugin i_s_innodb_index_stats_maria;
+
 #endif /* i_s_h */