summaryrefslogtreecommitdiff
path: root/server-tools/instance-manager/parse.cc
diff options
context:
space:
mode:
authorunknown <petr@mysql.com>2004-11-06 23:18:28 +0300
committerunknown <petr@mysql.com>2004-11-06 23:18:28 +0300
commit0157ffa5fd491b886586dbb0236fef8ae0af4d49 (patch)
treef3ad005ccc437c24e1a37e5efb8b578b4788cc78 /server-tools/instance-manager/parse.cc
parent4f32ec18822f90ff118f4cbe655b80f977d7077f (diff)
downloadmariadb-git-0157ffa5fd491b886586dbb0236fef8ae0af4d49.tar.gz
few more fixes - fix makefile and get rid of strncasecmp in favour of
my_strnncoll server-tools/instance-manager/Makefile.am: one more makefile fix server-tools/instance-manager/parse.cc: get rid of non-portable strnacasecmp
Diffstat (limited to 'server-tools/instance-manager/parse.cc')
-rw-r--r--server-tools/instance-manager/parse.cc27
1 files changed, 17 insertions, 10 deletions
diff --git a/server-tools/instance-manager/parse.cc b/server-tools/instance-manager/parse.cc
index 09a60062946..38e10c7f2f5 100644
--- a/server-tools/instance-manager/parse.cc
+++ b/server-tools/instance-manager/parse.cc
@@ -31,15 +31,21 @@ enum Token
TOK_END
};
-static const char *tokens[]= {
- "FLUSH",
- "INSTANCE",
- "INSTANCES",
- "OPTIONS",
- "START",
- "STATUS",
- "STOP",
- "SHOW",
+struct tokens_st
+{
+ uint length;
+ const char *tok_name;
+};
+
+static struct tokens_st tokens[]= {
+ {5, "FLUSH"},
+ {8, "INSTANCE"},
+ {9, "INSTANCES"},
+ {7, "OPTIONS"},
+ {5, "START"},
+ {6, "STATUS"},
+ {4, "STOP"},
+ {4, "SHOW"}
};
@@ -76,7 +82,8 @@ inline Token find_token(const char *word, uint word_len)
int i= 0;
do
{
- if (strncasecmp(tokens[i], word, word_len) == 0)
+ if (my_strnncoll(default_charset_info, (const uchar *) tokens[i].tok_name,
+ tokens[i].length, (const uchar *) word, word_len) == 0)
break;
}
while (++i < TOK_NOT_FOUND);