diff --git a/include/my_getopt.h b/include/my_getopt.h index 92cb8da90cd..95de005087d 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -134,15 +134,6 @@ double getopt_double_limit_value(double num, const struct my_option *optp, ulonglong getopt_double2ulonglong(double); double getopt_ulonglong2double(ulonglong); -static inline void convert_dash_to_underscore(char *str, size_t len) -{ - for (char *p= str; p <= str+len; p++) - if (*p == '-') - *p= '_'; - else if (*p != '_' && isalnum(*p) == 0) - break; -} - static inline void convert_underscore_to_dash(char *str, size_t len) { for (char *p= str; p <= str+len; p++) diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 0f82341bb07..4f66c03f8a1 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -4220,10 +4220,9 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, var= NULL; len= tmp->name.length + strlen(o->name) + 2; varname= (char*) alloc_root(mem_root, len); - strxmov(varname, tmp->name.str, "-", o->name, NullS); + strxmov(varname, tmp->name.str, "_", o->name, NullS); // Ok to use latin1, as the variable name is pure ASCII my_casedn_str_latin1(varname); - convert_dash_to_underscore(varname, len-1); } if (o->flags & PLUGIN_VAR_NOSYSVAR) {