mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
merge 5.1-> 5.2
This commit is contained in:
@ -1536,7 +1536,7 @@ error:
|
||||
|
||||
void plugin_shutdown(void)
|
||||
{
|
||||
uint i, count= plugin_array.elements, free_slots= 0;
|
||||
uint i, count= plugin_array.elements;
|
||||
struct st_plugin_int **plugins, *plugin;
|
||||
struct st_plugin_dl **dl;
|
||||
DBUG_ENTER("plugin_shutdown");
|
||||
@ -1557,18 +1557,13 @@ void plugin_shutdown(void)
|
||||
while (reap_needed && (count= plugin_array.elements))
|
||||
{
|
||||
reap_plugins();
|
||||
for (i= free_slots= 0; i < count; i++)
|
||||
for (i= 0; i < count; i++)
|
||||
{
|
||||
plugin= *dynamic_element(&plugin_array, i, struct st_plugin_int **);
|
||||
switch (plugin->state) {
|
||||
case PLUGIN_IS_READY:
|
||||
if (plugin->state == PLUGIN_IS_READY)
|
||||
{
|
||||
plugin->state= PLUGIN_IS_DELETED;
|
||||
reap_needed= true;
|
||||
break;
|
||||
case PLUGIN_IS_FREED:
|
||||
case PLUGIN_IS_UNINITIALIZED:
|
||||
free_slots++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!reap_needed)
|
||||
@ -1581,9 +1576,6 @@ void plugin_shutdown(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (count > free_slots && global_system_variables.log_warnings > 1)
|
||||
sql_print_warning("Forcing shutdown of %d plugins", count - free_slots);
|
||||
|
||||
plugins= (struct st_plugin_int **) my_alloca(sizeof(void*) * (count+1));
|
||||
|
||||
/*
|
||||
@ -1605,8 +1597,8 @@ void plugin_shutdown(void)
|
||||
if (!(plugins[i]->state & (PLUGIN_IS_UNINITIALIZED | PLUGIN_IS_FREED |
|
||||
PLUGIN_IS_DISABLED)))
|
||||
{
|
||||
sql_print_information("Plugin '%s' will be forced to shutdown",
|
||||
plugins[i]->name.str);
|
||||
sql_print_warning("Plugin '%s' will be forced to shutdown",
|
||||
plugins[i]->name.str);
|
||||
/*
|
||||
We are forcing deinit on plugins so we don't want to do a ref_count
|
||||
check until we have processed all the plugins.
|
||||
@ -2090,7 +2082,7 @@ static int check_func_set(THD *thd, struct st_mysql_sys_var *var,
|
||||
const char *strvalue= "NULL", *str;
|
||||
TYPELIB *typelib;
|
||||
ulonglong result;
|
||||
uint error_len;
|
||||
uint error_len= 0; // init as only set on error
|
||||
bool not_used;
|
||||
int length;
|
||||
|
||||
@ -2689,7 +2681,9 @@ uchar* sys_var_pluginvar::value_ptr(THD *thd, enum_var_type type,
|
||||
{
|
||||
if (!(value & mask))
|
||||
continue;
|
||||
str.append(typelib->type_names[i], typelib->type_lengths[i]);
|
||||
str.append(typelib->type_names[i], typelib->type_lengths
|
||||
? typelib->type_lengths[i]
|
||||
: strlen(typelib->type_names[i]));
|
||||
str.append(',');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user