diff options
author | unknown <serg@janus.mylan> | 2007-04-23 19:05:38 +0200 |
---|---|---|
committer | unknown <serg@janus.mylan> | 2007-04-23 19:05:38 +0200 |
commit | 66acd82f19ecb49229bb1070deda3c70f1b99e0f (patch) | |
tree | 017827b70f8e087ddcdcc8d4717ce88562e404b3 /sql/sql_plugin.cc | |
parent | 2b14696099ef00d539be3375e01eaf531da53039 (diff) | |
download | mariadb-git-66acd82f19ecb49229bb1070deda3c70f1b99e0f.tar.gz |
warning added
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r-- | sql/sql_plugin.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 83d71af227e..5ee6805b96b 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -2683,7 +2683,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, st_bookmark *v; DBUG_ENTER("construct_options"); 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 */ memcpy(name, plugin_name, namelen + 1); @@ -2759,7 +2759,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, break; default: sql_print_error("Unknown variable type code 0x%x in plugin '%s'.", - opt->flags, tmp->plugin->name); + opt->flags, plugin_name); DBUG_RETURN(-1); }; } @@ -2799,7 +2799,13 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, { opt->update= update_func_str; if (!(opt->flags & PLUGIN_VAR_MEMALLOC)) + { 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; case PLUGIN_VAR_ENUM: @@ -2816,7 +2822,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, break; default: sql_print_error("Unknown variable type code 0x%x in plugin '%s'.", - opt->flags, tmp->plugin->name); + opt->flags, plugin_name); DBUG_RETURN(-1); } @@ -2826,7 +2832,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, if (!opt->name) { sql_print_error("Missing variable name in plugin '%s'.", - tmp->plugin->name); + plugin_name); DBUG_RETURN(-1); } |