Skip to content

Commit 5358223

Browse files
committed
cleanup: remove convert_dash_to_underscore
it was a no-op, plugin variables don't have dashes
1 parent df10a94 commit 5358223

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

include/my_getopt.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,6 @@ double getopt_double_limit_value(double num, const struct my_option *optp,
134134
ulonglong getopt_double2ulonglong(double);
135135
double getopt_ulonglong2double(ulonglong);
136136

137-
static inline void convert_dash_to_underscore(char *str, size_t len)
138-
{
139-
for (char *p= str; p <= str+len; p++)
140-
if (*p == '-')
141-
*p= '_';
142-
else if (*p != '_' && isalnum(*p) == 0)
143-
break;
144-
}
145-
146137
static inline void convert_underscore_to_dash(char *str, size_t len)
147138
{
148139
for (char *p= str; p <= str+len; p++)

sql/sql_plugin.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4220,10 +4220,9 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
42204220
var= NULL;
42214221
len= tmp->name.length + strlen(o->name) + 2;
42224222
varname= (char*) alloc_root(mem_root, len);
4223-
strxmov(varname, tmp->name.str, "-", o->name, NullS);
4223+
strxmov(varname, tmp->name.str, "_", o->name, NullS);
42244224
// Ok to use latin1, as the variable name is pure ASCII
42254225
my_casedn_str_latin1(varname);
4226-
convert_dash_to_underscore(varname, len-1);
42274226
}
42284227
if (o->flags & PLUGIN_VAR_NOSYSVAR)
42294228
{

0 commit comments

Comments
 (0)