Commit 3e87e65b authored by serg@janus.mylan's avatar serg@janus.mylan

warning added

parent f49eb3fd
...@@ -2683,7 +2683,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, ...@@ -2683,7 +2683,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
st_bookmark *v; st_bookmark *v;
DBUG_ENTER("construct_options"); DBUG_ENTER("construct_options");
DBUG_PRINT("plugin", ("plugin: '%s' enabled: %d can_disable: %d", DBUG_PRINT("plugin", ("plugin: '%s' enabled: %d can_disable: %d",
tmp->plugin->name, **enabled, can_disable)); plugin_name, **enabled, can_disable));
/* support --skip-plugin-foo syntax */ /* support --skip-plugin-foo syntax */
memcpy(name, plugin_name, namelen + 1); memcpy(name, plugin_name, namelen + 1);
...@@ -2759,7 +2759,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, ...@@ -2759,7 +2759,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
break; break;
default: default:
sql_print_error("Unknown variable type code 0x%x in plugin '%s'.", sql_print_error("Unknown variable type code 0x%x in plugin '%s'.",
opt->flags, tmp->plugin->name); opt->flags, plugin_name);
DBUG_RETURN(-1); DBUG_RETURN(-1);
}; };
} }
...@@ -2799,7 +2799,13 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, ...@@ -2799,7 +2799,13 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
{ {
opt->update= update_func_str; opt->update= update_func_str;
if (!(opt->flags & PLUGIN_VAR_MEMALLOC)) if (!(opt->flags & PLUGIN_VAR_MEMALLOC))
{
opt->flags |= PLUGIN_VAR_READONLY; opt->flags |= PLUGIN_VAR_READONLY;
sql_print_warning("Server variable %s of plugin %s was forced "
"to be read-only: string variable without "
"update_func and PLUGIN_VAR_MEMALLOC flag",
opt->name, plugin_name);
}
} }
break; break;
case PLUGIN_VAR_ENUM: case PLUGIN_VAR_ENUM:
...@@ -2816,7 +2822,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, ...@@ -2816,7 +2822,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
break; break;
default: default:
sql_print_error("Unknown variable type code 0x%x in plugin '%s'.", sql_print_error("Unknown variable type code 0x%x in plugin '%s'.",
opt->flags, tmp->plugin->name); opt->flags, plugin_name);
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
...@@ -2826,7 +2832,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, ...@@ -2826,7 +2832,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
if (!opt->name) if (!opt->name)
{ {
sql_print_error("Missing variable name in plugin '%s'.", sql_print_error("Missing variable name in plugin '%s'.",
tmp->plugin->name); plugin_name);
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment