[Maria-developers] Additional info about engines
Hi! There is plans to add info about engines: http://askmonty.org/worklog/Server-BackLog/?tid=61 : ------------ Add additional information about engine and show it in SHOW ENGINES: License (PROPRIETARY, GPL, BSD) (it is present just have to be shown) Maturity (TEST, ALPHA, BETA, GAMMA, RELEASE) Version (just string from engine developer like "0.99 betta", better if it will be monotonically increasing in terms of alphabetical sort). ------------ Does anybody have some additions or thoughts about it?
maybe (but only maybe) I would consider to recommend to keep "SHOW ENGINES" identical to MySQL, but provide this additional info in "SELECT .. FROM Information_Schema.Engines" only. On Mon, Nov 2, 2009 at 22:09, Oleksandr Byelkin <sanja@askmonty.org> wrote:
Hi!
There is plans to add info about engines: http://askmonty.org/worklog/Server-BackLog/?tid=61 : ------------ Add additional information about engine and show it in SHOW ENGINES:
License (PROPRIETARY, GPL, BSD) (it is present just have to be shown)
Maturity (TEST, ALPHA, BETA, GAMMA, RELEASE)
Version (just string from engine developer like "0.99 betta", better if it will be monotonically increasing in terms of alphabetical sort). ------------ Does anybody have some additions or thoughts about it?
_______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
Hi Sanja On 03/11/2009, at 8:22 AM, Oleksandr Byelkin wrote:
2 нояб. 2009, в 23:09, Oleksandr Byelkin написал(а):
License (PROPRIETARY, GPL, BSD) (it is present just have to be shown)
Hmmm... Actually License also shown. So other question is above list enough?
No. Plugin/engine version is vital for people to be able to do bug reports or even check on features. And the maturity indicator can be useful. Cheers, Arjen. -- Arjen Lentz, Exec.Director @ Open Query (http://openquery.com) Exceptional Services for MySQL at a fixed budget. Follow our blog at http://openquery.com/blog/ OurDelta: enhanced builds for MySQL @ http://ourdelta.org
Hi! 2 нояб. 2009, в 23:09, Oleksandr Byelkin написал(а):
Hi!
There is plans to add info about engines: http://askmonty.org/worklog/Server-BackLog/?tid=61 :
[skip] Here is first implementation for review
Hi, Oleksandr! On Nov 03, Oleksandr Byelkin wrote:
Here is first implementation for review
/* Macros for beginning and ending plugin declarations. Between mysql_declare_plugin and mysql_declare_plugin_end there should @@ -398,7 +411,9 @@ const char *name; /* plugin name */ const char *author; /* plugin author (for SHOW PLUGINS) */ const char *descr; /* general descriptive text (for SHOW PLUGINS ) */ + const char *sversion; /* the plugin version string */ int license; /* the plugin license (PLUGIN_LICENSE_XXX) */ + int maturity; /* the plugin maturity (PLUGIN_MATURITY_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) */
=== modified file 'storage/federatedx/ha_federatedx.cc' --- storage/federatedx/ha_federatedx.cc 2009-10-30 18:50:56 +0000 +++ storage/federatedx/ha_federatedx.cc 2009-11-02 23:40:07 +0000 @@ -3476,7 +3476,13 @@ "FEDERATED", "Patrick Galbraith", "FederatedX pluggable storage engine", +#ifdef MARIADB + "1.0 beta", +#endif PLUGIN_LICENSE_GPL, +#ifdef MARIADB + PLUGIN_MATURITY_BETA, +#endif federatedx_db_init, /* Plugin Init */ federatedx_done, /* Plugin Deinit */ 0x0100 /* 1.0 */,
Whoa, that kind of kills the whole idea. One can load MySQL plugin into MariaDB and it'll crash. One can load MariaDB plugin into MySQL and it'll crash. One can load old MariaDB plugin into new MariaDB and it'll crash. The other way around will crash too. Using plugins becomes a walking-on-a-minefield experience. Versioning protection is there for a reason. And checks for API changes (a.k.a. check_abi rule in a Makefile) too. So, at first - you've modified the ABI, in an incompatible way. The very least you should do is to change the MYSQL_PLUGIN_INTERFACE_VERSION to be 0x0200. It would be also nice to have support for old 0x0100 plugins in sql_plugin.cc, but it's optional. Still, it will be possible to load MySQL and MariaDB plugins interchangeably which will only cause crashes. Now you need to decide what you want and what MariaDB is. If it's *extended* but compatible (at least plugin-wise) version, than all plugins should load interchangeably and *not* crash, at least. If MariaDB have chosen to diverge - plugins should not load interchangeably. Make you choice. To keep plugins compatible - you add another set of symbols, say, _mariadb_plugin_interface_version_ and _mariadb_plugin_declarations_[]. This way you one can add extensions to the plugin API and keep it compatible. And remove ifdefs from the plugin sources too. To make MariaDB plugins incompatible you *rename* all _mysql_* symbols to _mariadb_* symbols. Either way the automatic protection will work on load and the user won't need to track manually what he can load where. Regards / Mit vielen Grüßen, Sergei -- __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@sun.com> / /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect /_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028 <___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel Vorsitzender des Aufsichtsrates: Martin Häring
Hi!
"Sergei" == Sergei Golubchik <sergii@pisem.net> writes:
Sergei> Hi, Oleksandr! Sergei> On Nov 03, Oleksandr Byelkin wrote:
Here is first implementation for review
/* Macros for beginning and ending plugin declarations. Between mysql_declare_plugin and mysql_declare_plugin_end there should @@ -398,7 +411,9 @@ const char *name; /* plugin name */ const char *author; /* plugin author (for SHOW PLUGINS) */ const char *descr; /* general descriptive text (for SHOW PLUGINS ) */ + const char *sversion; /* the plugin version string */ int license; /* the plugin license (PLUGIN_LICENSE_XXX) */ + int maturity; /* the plugin maturity (PLUGIN_MATURITY_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) */
=== modified file 'storage/federatedx/ha_federatedx.cc' --- storage/federatedx/ha_federatedx.cc 2009-10-30 18:50:56 +0000 +++ storage/federatedx/ha_federatedx.cc 2009-11-02 23:40:07 +0000 @@ -3476,7 +3476,13 @@ "FEDERATED", "Patrick Galbraith", "FederatedX pluggable storage engine", +#ifdef MARIADB + "1.0 beta", +#endif PLUGIN_LICENSE_GPL, +#ifdef MARIADB + PLUGIN_MATURITY_BETA, +#endif federatedx_db_init, /* Plugin Init */ federatedx_done, /* Plugin Deinit */ 0x0100 /* 1.0 */,
Sergei> Whoa, that kind of kills the whole idea. Sergei> One can load MySQL plugin into MariaDB and it'll crash. One can load Sergei> MariaDB plugin into MySQL and it'll crash. One can load old MariaDB Sergei> plugin into new MariaDB and it'll crash. The other way around will crash Sergei> too. Using plugins becomes a walking-on-a-minefield experience. Sergei> Versioning protection is there for a reason. And checks for API changes Sergei> (a.k.a. check_abi rule in a Makefile) too. Sergei> So, at first - you've modified the ABI, in an incompatible way. The very Sergei> least you should do is to change the MYSQL_PLUGIN_INTERFACE_VERSION to Sergei> be 0x0200. It would be also nice to have support for old 0x0100 plugins Sergei> in sql_plugin.cc, but it's optional. Agree. Sergei> Still, it will be possible to load MySQL and MariaDB plugins Sergei> interchangeably which will only cause crashes. Sergei> Now you need to decide what you want and what MariaDB is. If it's Sergei> *extended* but compatible (at least plugin-wise) version, than all Sergei> plugins should load interchangeably and *not* crash, at least. What we would like to have is to get the above two additional fields (version and maturity) defined by all new plugins. It would of course be preferable to do that in a way that would enable us to download both old and new plugins, but nether Sanja or I know how to do this. You where not on IRC yesterday, so I asked Sanja to make a quick draft to have something to discuss around. Sergei> If MariaDB have chosen to diverge - plugins should not load Sergei> interchangeably. See above. Preferably I would like to be compatible, but if there is no possible way to achieve this, then being incompatible (at least for storage engines) is not a big loss. This is because our TABLE, THD and other structures are already different from MySQL's so engines already have to be specially compiled for MariaDB. Sergei> Make you choice. Sergei> To keep plugins compatible - you add another set of symbols, say, Sergei> _mariadb_plugin_interface_version_ and _mariadb_plugin_declarations_[]. Sergei> This way you one can add extensions to the plugin API and keep it Sergei> compatible. And remove ifdefs from the plugin sources too. Can you give Sanja an example how to do this ? Sergei> To make MariaDB plugins incompatible you *rename* all _mysql_* symbols Sergei> to _mariadb_* symbols. Sergei> Either way the automatic protection will work on load and the user won't Sergei> need to track manually what he can load where. Thanks for the comments! Regards, Monty
participants (5)
-
Arjen Lentz
-
Michael Widenius
-
Oleksandr Byelkin
-
Peter Laursen
-
Sergei Golubchik