[Maria-developers] 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@askmonty.org-20091204114937-cfkvax0g36d3nq3j
parent: psergey@askmonty.org-20091202142609-18bp41q8mejxl47t
committer: sanja@askmonty.org
branch nick: work-maria-5.2-engine
timestamp: Fri 2009-12-04 13:49:37 +0200
message:
Maria WL#61
Interface for maria extensions.
Additional information about plugins (maturity and string version) interface for maria extensions.
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt 2009-10-03 19:24:13 +0000
+++ b/CMakeLists.txt 2009-12-04 11:49:37 +0000
@@ -251,6 +251,7 @@
IF (ENGINE_BUILD_TYPE STREQUAL "STATIC")
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_${PLUGIN_NAME}_plugin")
+ SET (mariaext_plugin_defs "${mariaext_plugin_defs},bltnmext_${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)
@@ -269,6 +270,7 @@
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 (mariaext_plugin_defs "${mariaext_plugin_defs},bltnmext_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 2009-12-04 11:49:37 +0000
@@ -461,6 +461,7 @@
])
])
mysql_plugin_defs="$mysql_plugin_defs, [builtin_]$2[_plugin]"
+ mariaext_plugin_defs="$mariaext_plugin_defs, [bltnmext_]$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 2009-12-04 11:49:37 +0000
@@ -2842,6 +2842,7 @@
AC_SUBST(mysql_plugin_dirs)
AC_SUBST(mysql_plugin_libs)
AC_SUBST(mysql_plugin_defs)
+AC_SUBST(mariaext_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 2009-12-04 11:49:37 +0000
@@ -65,7 +65,10 @@
Plugin API. Common for all plugin types.
*/
+/* MySQL plugin interface version */
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0100
+/* MariaDB extentsion interface version */
+#define MARIAEXT_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 __MARIAEXT_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
+int VERSION= MARIAEXT_PLUGIN_INTERFACE_VERSION; \
+int PSIZE= sizeof(struct st_mariaext_plugin); \
+struct st_mariaext_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 __MARIAEXT_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
+MYSQL_PLUGIN_EXPORT int _mariaext_plugin_interface_version_= MARIAEXT_PLUGIN_INTERFACE_VERSION; \
+MYSQL_PLUGIN_EXPORT int _mariaext_sizeof_struct_st_plugin_= sizeof(struct st_mariaext_plugin); \
+MYSQL_PLUGIN_EXPORT struct st_mariaext_plugin _mariaext_plugin_declarations_[]= {
+
#endif
#define mysql_declare_plugin(NAME) \
@@ -111,7 +143,14 @@
builtin_ ## NAME ## _sizeof_struct_st_plugin, \
builtin_ ## NAME ## _plugin)
+#define mariaext_declare_plugin(NAME) \
+__MARIAEXT_DECLARE_PLUGIN(NAME, \
+ bltnmext_ ## NAME ## _plugin_interface_version, \
+ bltnmext_ ## NAME ## _sizeof_struct_st_plugin, \
+ bltnmext_ ## NAME ## _plugin)
+
#define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0}}
+#define mariaext_declare_plugin_end ,{0,0}}
/*
declarations for SHOW STATUS support in plugins
@@ -407,6 +446,16 @@
void * __reserved1; /* reserved for dependency checking */
};
+/*
+ MariaDB extension for plugins declaration structure.
+*/
+
+struct st_mariaext_plugin
+{
+ const char *sversion; /* plugin version string */
+ int maturity; /* HA_PLUGIN_MATURITY_XXX */
+};
+
/*************************************************************************
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 2009-12-04 11:49:37 +0000
@@ -46,6 +46,11 @@
struct st_mysql_sys_var **system_vars;
void * __reserved1;
};
+struct st_mariaext_plugin
+{
+ const char *sversion;
+ int maturity;
+};
enum enum_ftparser_mode
{
MYSQL_FTPARSER_SIMPLE_MODE= 0,
=== 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 2009-12-04 11:49:37 +0000
@@ -200,3 +200,9 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(daemon_example)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_TEST /* maturity */
+}
+mariaext_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 2009-12-04 11:49:37 +0000
@@ -270,4 +270,10 @@
NULL
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(ftexample)
+{
+ "0.01", /* string version */
+ PLUGIN_MATURITY_TEST /* maturity */
+}
+mariaext_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 2009-12-04 11:49:37 +0000
@@ -10561,5 +10561,11 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(ndbcluster)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_BETA /* maturity */
+}
+mariaext_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 2009-12-04 11:49:37 +0000
@@ -6510,5 +6510,11 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(partition)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+}
+mariaext_declare_plugin_end;
#endif
=== modified file 'sql/log.cc'
--- a/sql/log.cc 2009-11-12 04:31:28 +0000
+++ b/sql/log.cc 2009-12-04 11:49:37 +0000
@@ -5795,3 +5795,9 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(binlog)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+}
+mariaext_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 2009-12-04 11:49:37 +0000
@@ -16,6 +16,7 @@
#include
4 дек. 2009, в 13:49,
At file:///Users/bell/maria/bzr/work-maria-5.2-engine/
------------------------------------------------------------ revno: 2734 revision-id: sanja@askmonty.org-20091204114937-cfkvax0g36d3nq3j parent: psergey@askmonty.org-20091202142609-18bp41q8mejxl47t committer: sanja@askmonty.org branch nick: work-maria-5.2-engine timestamp: Fri 2009-12-04 13:49:37 +0200 message: Maria WL#61
Interface for maria extensions. Additional information about plugins (maturity and string version) interface for maria extensions.
For third part's plugins I added only proposals how new informations should looks like (it is up to owners to fix it). For plugins who wants to compile the same code under drizzle or mysql I put example in pbxt (#ifdefs). Results looks like this: select PLUGIN_NAME, PLUGIN_MATURITY, PLUGIN_AUTH_VERSION from plugins; PLUGIN_NAME PLUGIN_MATURITY PLUGIN_AUTH_VERSION binlog Release 1.0 MyISAM Release 1.0 partition Release 1.0 ARCHIVE Release 1.0 BLACKHOLE Release 1.0 CSV Release 1.0 FEDERATED Unknown 1.0 MEMORY Release 1.0 MARIA Gamma 1.5 MRG_MYISAM Release 1.0 PBXT Unknown 1.0 PBXT_STATISTICS Unknown 1.0 InnoDB Release 1.0.3-6a INNODB_RSEG Release 1.0 INNODB_BUFFER_POOL_PAGES Release 1.0 INNODB_BUFFER_POOL_PAGES_INDEX Release 1.0 INNODB_BUFFER_POOL_PAGES_BLOB Release 1.0 INNODB_TRX Release 1.0.3-6a INNODB_LOCKS Release 1.0.3-6a INNODB_LOCK_WAITS Release 1.0.3-6a INNODB_CMP Release 1.0.3-6a INNODB_CMP_RESET Release 1.0.3-6a INNODB_CMPMEM Release 1.0.3-6a INNODB_CMPMEM_RESET Release 1.0.3-6a INNODB_TABLE_STATS Release 1.0 INNODB_INDEX_STATS Release 1.0 XTRADB_ENHANCEMENTS Release 1.0.3-6a
Hi!
4 дек. 2009, в 13:49,
написал(а): At file:///Users/bell/maria/bzr/work-maria-5.2-engine/
------------------------------------------------------------ revno: 2734 revision-id: sanja@askmonty.org-20091204114937-cfkvax0g36d3nq3j parent: psergey@askmonty.org-20091202142609-18bp41q8mejxl47t committer: sanja@askmonty.org branch nick: work-maria-5.2-engine timestamp: Fri 2009-12-04 13:49:37 +0200 message: Maria WL#61
Interface for maria extensions. Additional information about plugins (maturity and string version) interface for maria extensions.
For third part's plugins I added only proposals how new informations should looks like (it is up to owners to fix it). For plugins who wants to compile the same code under drizzle or mysql I put example in pbxt (#ifdefs).
Results looks like this:
select PLUGIN_NAME, PLUGIN_MATURITY, PLUGIN_AUTH_VERSION from plugins; PLUGIN_NAME PLUGIN_MATURITY PLUGIN_AUTH_VERSION binlog Release 1.0 MyISAM Release 1.0 partition Release 1.0 ARCHIVE Release 1.0 BLACKHOLE Release 1.0 CSV Release 1.0 FEDERATED Unknown 1.0 MEMORY Release 1.0 MARIA Gamma 1.5 MRG_MYISAM Release 1.0
PBXT Unknown 1.0 PBXT_STATISTICS Unknown 1.0
PBXT should be at RC. The release number (found in storage/pbxt/Changelog) is now 1.0.9g RC3 <cut> Regards, Monty
Hi!
"sanja" == sanja
writes:
sanja> At file:///Users/bell/maria/bzr/work-maria-5.2-engine/ sanja> ------------------------------------------------------------ sanja> revno: 2734 sanja> revision-id: sanja@askmonty.org-20091204114937-cfkvax0g36d3nq3j sanja> parent: psergey@askmonty.org-20091202142609-18bp41q8mejxl47t sanja> committer: sanja@askmonty.org sanja> branch nick: work-maria-5.2-engine sanja> timestamp: Fri 2009-12-04 13:49:37 +0200 sanja> message: sanja> Maria WL#61 <cut>
+++ b/CMakeLists.txt 2009-12-04 11:49:37 +0000 @@ -251,6 +251,7 @@
IF (ENGINE_BUILD_TYPE STREQUAL "STATIC") SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_${PLUGIN_NAME}_plugin") + SET (mariaext_plugin_defs "${mariaext_plugin_defs},bltnmext_${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) @@ -269,6 +270,7 @@ 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 (mariaext_plugin_defs "${mariaext_plugin_defs},bltnmext_partition_plugin") ENDIF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
Probably stupid questions, but why mariaext instead of just mariadb? What does 'bltnmext_partition_plugin' stand for ? Can we use a more understandable name, like builtin_mariadb_partition_plugin ? <cut>
--- a/include/mysql/plugin.h 2009-09-07 20:50:10 +0000
<cut>
+/* + MariaDB extension for plugins declaration structure. +*/ + +struct st_mariaext_plugin +{ + const char *sversion; /* plugin version string */
sversion -> version ?
+ int maturity; /* HA_PLUGIN_MATURITY_XXX */ +}; + /************************************************************************* API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN) */
=== modified file 'sql/sql_plugin.cc' --- a/sql/sql_plugin.cc 2009-11-12 04:31:28 +0000 +++ b/sql/sql_plugin.cc 2009-12-04 11:49:37 +0000
+ - for (plugin= tmp.plugin_dl->plugins; plugin->info; plugin++) + for (plugin= tmp.plugin_dl->plugins, ext= tmp.plugin_dl->mariaext; + plugin->info; + plugin++, ext++) { + mariaext= ext; + if (!ext->sversion) + { + mariaext= empty_mariaext; + ext--; + }
Please add a comment for the above if. For example: /* Plugin didn't have any mariadb extensions; Use default one and reset counter to do same for next internal plugin. */
+ /* extensions should be the same numbers as static plugins) */ + DBUG_ASSERT(*bltnmexts); + for (plugin= *builtins, ext= *bltnmexts; + plugin->info; + plugin++, ext++) { + + /* in case if plugin describe less extensions then plugins */ + mariaext= ext; + if (!ext->sversion) + { + mariaext= empty_mariaext; + ext--; + } +
I am a bit unsure about the above code; If we allow one to describe less extensions, then it's not sure that when one adds a new plugin with extension information, one remembers to also add all missing extensions. I think that for staticly compiled plugins we should require that they have also extension information. What do you think about this? <cut>
--- a/sql/sql_show.cc 2009-11-12 04:31:28 +0000
<cut>
+ switch (mariaext->maturity) { + case PLUGIN_MATURITY_UNKNOWN: + table->field[10]->store(PLUGIN_MATURITY_UNKNOWN_STR, + sizeof(PLUGIN_MATURITY_UNKNOWN_STR) - 1, cs); + break; + case PLUGIN_MATURITY_TEST: + table->field[10]->store(PLUGIN_MATURITY_TEST_STR, + sizeof(PLUGIN_MATURITY_TEST_STR) - 1, cs); + break; + case PLUGIN_MATURITY_ALPHA: + table->field[10]->store(PLUGIN_MATURITY_ALPHA_STR, + sizeof(PLUGIN_MATURITY_ALPHA_STR) - 1, cs); + break; + case PLUGIN_MATURITY_BETA: + table->field[10]->store(PLUGIN_MATURITY_BETA_STR, + sizeof(PLUGIN_MATURITY_BETA_STR) - 1, cs); + break; + case PLUGIN_MATURITY_GAMMA: + table->field[10]->store(PLUGIN_MATURITY_GAMMA_STR, + sizeof(PLUGIN_MATURITY_GAMMA_STR) - 1, cs); + break; + case PLUGIN_MATURITY_RELEASE: + table->field[10]->store(PLUGIN_MATURITY_RELEASE_STR, + sizeof(PLUGIN_MATURITY_RELEASE_STR) - 1, cs); + break;
If we would store the maturity as an array of LEX_STRINGS, we could do the above as: if ((uint) mariaext->maturity <= PLUGIN_MATURITY_RELEASE) table->field[10]->store(maturity_array[mariaext->maturity].str, maturity_array[mariaext->maturity].length, cs); else { DBUG_ASSERT(0); table->field[10]->store("Unknown", 7, cs); } <cut>
=== 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 2009-12-04 11:49:37 +0000 @@ -3491,3 +3491,9 @@ NULL /* config options */ } mysql_declare_plugin_end; +mariaext_declare_plugin(federated) +{ + "1.0", /* string version */ + PLUGIN_MATURITY_UNKNOWN /* maturity */ +}
->
+ "2.0", /* string version */ + PLUGIN_MATURITY_BETA /* maturity */
=== 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 2009-12-04 11:49:37 +0000 @@ -5507,6 +5507,18 @@ drizzle_declare_plugin_end; #else mysql_declare_plugin_end; +#ifdef MARIADB_BASE_VERSION +mariaext_declare_plugin(pbxt) +{ /* PBXT */ + "1.0", /* string version */
1.0.09g RC3
+ PLUGIN_MATURITY_UNKNOWN /* maturity */
PLUGIN_MATURITY_GAMMA
+}, +{ /* PBXT_STATISTICS */ + "1.0", /* string version */
1.0.09g RC3
+ PLUGIN_MATURITY_UNKNOWN /* maturity */
PLUGIN_MATURITY_GAMMA
+}
Regards, Monty
Hi! 22 янв. 2010, в 15:31, Michael Widenius написал(а):
Hi!
"sanja" == sanja
writes: sanja> At file:///Users/bell/maria/bzr/work-maria-5.2-engine/ sanja> ------------------------------------------------------------ sanja> revno: 2734 sanja> revision-id: sanja@askmonty.org-20091204114937-cfkvax0g36d3nq3j sanja> parent: psergey@askmonty.org-20091202142609-18bp41q8mejxl47t sanja> committer: sanja@askmonty.org sanja> branch nick: work-maria-5.2-engine sanja> timestamp: Fri 2009-12-04 13:49:37 +0200 sanja> message: sanja> Maria WL#61
<cut>
+++ b/CMakeLists.txt 2009-12-04 11:49:37 +0000 @@ -251,6 +251,7 @@
IF (ENGINE_BUILD_TYPE STREQUAL "STATIC") SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_$ {PLUGIN_NAME}_plugin") + SET (mariaext_plugin_defs "$ {mariaext_plugin_defs},bltnmext_${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) @@ -269,6 +270,7 @@ 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 (mariaext_plugin_defs "$ {mariaext_plugin_defs},bltnmext_partition_plugin") ENDIF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
Probably stupid questions, but why mariaext instead of just mariadb?
MARIAdbEXTension
What does 'bltnmext_partition_plugin' stand for ? Can we use a more understandable name, like builtin_mariadb_partition_plugin ?
yes
<cut>
--- a/include/mysql/plugin.h 2009-09-07 20:50:10 +0000
<cut>
+/* + MariaDB extension for plugins declaration structure. +*/ + +struct st_mariaext_plugin +{ + const char *sversion; /* plugin version string */
sversion -> version ?
actually it was string version (we have already numeric one).
+ int maturity; /* HA_PLUGIN_MATURITY_XXX */ +}; + / ************************************************************************* API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN) */
=== modified file 'sql/sql_plugin.cc' --- a/sql/sql_plugin.cc 2009-11-12 04:31:28 +0000 +++ b/sql/sql_plugin.cc 2009-12-04 11:49:37 +0000 [skip] + /* extensions should be the same numbers as static plugins) */ + DBUG_ASSERT(*bltnmexts); + for (plugin= *builtins, ext= *bltnmexts; + plugin->info; + plugin++, ext++) { + + /* in case if plugin describe less extensions then plugins */ + mariaext= ext; + if (!ext->sversion) + { + mariaext= empty_mariaext; + ext--; + } +
I am a bit unsure about the above code; If we allow one to describe less extensions, then it's not sure that when one adds a new plugin with extension information, one remembers to also add all missing extensions.
I think that for staticly compiled plugins we should require that they have also extension information. What do you think about this?
It is for dynamically linked plugins. Of course statically linked will have everything but they will be included in built in plugins array (it is other code). [skip]
Hi!
"Oleksandr" == Oleksandr Byelkin
writes:
Oleksandr> Hi! Oleksandr> 22 янв. 2010, в 15:31, Michael Widenius написал(а):
{mysql_plugin_defs},builtin_partition_plugin") + SET (mariaext_plugin_defs "$ {mariaext_plugin_defs},bltnmext_partition_plugin") ENDIF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
Probably stupid questions, but why mariaext instead of just mariadb?
Oleksandr> MARIAdbEXTension why not simply mariadb_plugin_defs to mimic the mysql one. or if you really want to have 'ext' then use: mariadb_extra_plugin_defs <cut>
+struct st_mariaext_plugin +{ + const char *sversion; /* plugin version string */
sversion -> version ?
Oleksandr> actually it was string version (we have already numeric one). Then use 'version_info' <cut>
I think that for staticly compiled plugins we should require that they have also extension information. What do you think about this?
Oleksandr> It is for dynamically linked plugins. Of course statically linked will Oleksandr> have everything but they will be included in built in plugins array Oleksandr> (it is other code). then ok. Regards, Monty
Hi! 26 янв. 2010, в 10:54, Michael Widenius написал(а):
+struct st_mariaext_plugin +{ + const char *sversion; /* plugin version string */
sversion -> version ?
Oleksandr> actually it was string version (we have already numeric one).
Then use 'version_info'
<cut>
I think that for staticly compiled plugins we should require that they have also extension information. What do you think about this?
Oleksandr> It is for dynamically linked plugins. Of course statically linked will Oleksandr> have everything but they will be included in built in plugins array Oleksandr> (it is other code).
then ok.
Actually I mistaken. Here is case of lack plugins descriptions in case of describing several plugins in one file (one array). I can put DBUG_ASSERT instead of above code (the code is working it was checked). At least one plugin (first) should have extension otherwise it will be compiler error.
Hi!
"Oleksandr" == Oleksandr Byelkin
writes:
Oleksandr> Hi! Oleksandr> 26 янв. 2010, в 10:54, Michael Widenius написал(а):
+struct st_mariaext_plugin +{ + const char *sversion; /* plugin version string */
sversion -> version ?
Oleksandr> actually it was string version (we have already numeric
one).
Then use 'version_info'
<cut>
I think that for staticly compiled plugins we should require that they have also extension information. What do you think about this?
Oleksandr> It is for dynamically linked plugins. Of course
statically linked will Oleksandr> have everything but they will be included in built in plugins array Oleksandr> (it is other code).
then ok.
Oleksandr> Actually I mistaken. Here is case of lack plugins descriptions in case Oleksandr> of describing several plugins in one file (one array). I can put Oleksandr> DBUG_ASSERT instead of above code (the code is working it was Oleksandr> checked). At least one plugin (first) should have extension otherwise Oleksandr> it will be compiler error. Please add the DBUG_ASSERT. Regards, Monty
participants (3)
-
Michael Widenius
-
Oleksandr Byelkin
-
sanja@askmonty.org