MDEV-4529 Assertion `tmp->state == 4' fails on mix of INSTALL SONAME / UNINSTALL PLUGIN
fix incorrect assert
This commit is contained in:
parent
36c7535198
commit
1fb33e4a67
@ -173,3 +173,22 @@ select 1;
|
|||||||
UNINSTALL PLUGIN example;
|
UNINSTALL PLUGIN example;
|
||||||
UNINSTALL PLUGIN MyISAM;
|
UNINSTALL PLUGIN MyISAM;
|
||||||
ERROR HY000: Built-in plugins cannot be deleted
|
ERROR HY000: Built-in plugins cannot be deleted
|
||||||
|
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
|
||||||
|
plugin_name
|
||||||
|
install soname 'ha_example';
|
||||||
|
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
|
||||||
|
plugin_name
|
||||||
|
EXAMPLE
|
||||||
|
UNUSABLE
|
||||||
|
uninstall plugin example;
|
||||||
|
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
|
||||||
|
plugin_name
|
||||||
|
UNUSABLE
|
||||||
|
install soname 'ha_example';
|
||||||
|
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
|
||||||
|
plugin_name
|
||||||
|
EXAMPLE
|
||||||
|
UNUSABLE
|
||||||
|
uninstall soname 'ha_example';
|
||||||
|
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
|
||||||
|
plugin_name
|
||||||
|
@ -155,3 +155,17 @@ UNINSTALL PLUGIN example;
|
|||||||
--error ER_PLUGIN_DELETE_BUILTIN
|
--error ER_PLUGIN_DELETE_BUILTIN
|
||||||
UNINSTALL PLUGIN MyISAM;
|
UNINSTALL PLUGIN MyISAM;
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV-4529 Assertion `tmp->state == 4' fails on mix of INSTALL SONAME / UNINSTALL PLUGIN
|
||||||
|
#
|
||||||
|
|
||||||
|
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
|
||||||
|
install soname 'ha_example';
|
||||||
|
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
|
||||||
|
uninstall plugin example;
|
||||||
|
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
|
||||||
|
install soname 'ha_example';
|
||||||
|
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
|
||||||
|
uninstall soname 'ha_example';
|
||||||
|
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
|
||||||
|
|
||||||
|
@ -2032,9 +2032,13 @@ static bool finalize_install(THD *thd, TABLE *table, const LEX_STRING *name)
|
|||||||
ER_CANT_INITIALIZE_UDF, ER(ER_CANT_INITIALIZE_UDF),
|
ER_CANT_INITIALIZE_UDF, ER(ER_CANT_INITIALIZE_UDF),
|
||||||
name->str, "Plugin is disabled");
|
name->str, "Plugin is disabled");
|
||||||
}
|
}
|
||||||
|
else if (tmp->state != PLUGIN_IS_UNINITIALIZED)
|
||||||
|
{
|
||||||
|
/* already installed */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBUG_ASSERT(tmp->state == PLUGIN_IS_UNINITIALIZED);
|
|
||||||
if (plugin_initialize(tmp))
|
if (plugin_initialize(tmp))
|
||||||
{
|
{
|
||||||
report_error(REPORT_TO_USER, ER_CANT_INITIALIZE_UDF, name->str,
|
report_error(REPORT_TO_USER, ER_CANT_INITIALIZE_UDF, name->str,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user