maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #04154
Re: Rev 2994: BUG#790513: MariaDB crashes on startup
Hi, Sergey!
On Jun 17, Sergey Petrunya wrote:
> Hi Sergei,
>
> Could you please review the below:
>
> ------------------------------------------------------------
> revno: 2994
> committer: Sergey Petrunya <psergey@xxxxxxxxxxxx>
> timestamp: Fri 2011-06-17 01:05:20 +0400
> message:
> BUG#790513: MariaDB crashes on startup
please use lp:790513 abbreviation for bugs.
see 'bzr help bugs' for details.
> - Let ha_resolve_by_name() print error in case it could locate
> the needed plugin but the plugin hasn't yet been initialized.
> One can hit this problem by having mysql.plugin of type=innodb.
Okay, I see the problem.
But why couldn't we just initialize *all* built-in plugins earlier, before
accessing mysql.plugin table ?
> === modified file 'sql/handler.cc'
> --- a/sql/handler.cc 2011-05-03 16:10:10 +0000
> +++ b/sql/handler.cc 2011-06-16 21:05:20 +0000
> @@ -135,6 +135,12 @@
> if ((plugin= my_plugin_lock_by_name(thd, name, MYSQL_STORAGE_ENGINE_PLUGIN)))
> {
> handlerton *hton= plugin_data(plugin, handlerton *);
> + if (!hton)
> + {
> + sql_print_error("Attempt to use a built-in plugin %*s before it "
> + "has been initialized", name->length, name->str);
> + return NULL;
> + }
> if (!(hton->flags & HTON_NOT_USER_SELECTABLE))
> return plugin;
>
Regards,
Sergei