MariaDB 5.2 shows similar behaviour. I have xtradb built-in, and even there after doing "alter table mysql.plugin engine=innodb" the server will crash on startup.
The cause of the crash is that mysql.plugin table is read before plugins are initialized.
When mysqld tries to open mysql.plugin it will at some point call ha_resolve_by_name() . When it executes this part of that function:
if ((plugin= my_plugin_lock_by_name(thd, name, MYSQL_STORAGE_ENGINE_PLUGIN)))
{
handlerton *hton= plugin_data(plugin, handlerton *);
if (!(hton->flags & HTON_NOT_USER_SELECTABLE))
return plugin;
it will have
(gdb) p plugin
$42 = (plugin_ref) 0xa04f218
(gdb) p hton
$43 = (handlerton *) 0x0
(gdb) p plugin->data
$44 = (void *) 0x0
hton==NULL because ha_initialize_handlerton() haven't yet been called for xtradb.
MariaDB 5.2 shows similar behaviour. I have xtradb built-in, and even there after doing "alter table mysql.plugin engine=innodb" the server will crash on startup.
The cause of the crash is that mysql.plugin table is read before plugins are initialized.
When mysqld tries to open mysql.plugin it will at some point call ha_resolve_ by_name( ) . When it executes this part of that function:
if ((plugin= my_plugin_ lock_by_ name(thd, name, MYSQL_STORAGE_ ENGINE_ PLUGIN) )) USER_SELECTABLE ))
{
handlerton *hton= plugin_data(plugin, handlerton *);
if (!(hton->flags & HTON_NOT_
return plugin;
it will have
(gdb) p plugin
$42 = (plugin_ref) 0xa04f218
(gdb) p hton
$43 = (handlerton *) 0x0
(gdb) p plugin->data
$44 = (void *) 0x0
hton==NULL because ha_initialize_ handlerton( ) haven't yet been called for xtradb.