diff options
author | unknown <petr@mysql.com> | 2005-05-16 01:54:02 +0400 |
---|---|---|
committer | unknown <petr@mysql.com> | 2005-05-16 01:54:02 +0400 |
commit | 6b4dbcb4db8236d5226284ff87af9126aa83f5b6 (patch) | |
tree | c34a10d30055a4de902dd7001ead6591c91a909c /server-tools/instance-manager/parse.cc | |
parent | 1ad379af8d404cc257c2ce831e4b5dec80f1c78c (diff) | |
download | mariadb-git-6b4dbcb4db8236d5226284ff87af9126aa83f5b6.tar.gz |
post-review fixes
include/my_sys.h:
added prototype for the defaults correction function
libmysql/Makefile.shared:
my_chsize added to libmysql to let my_correct_defaults_file be used from libmysql
mysys/default.c:
New defaults function added we use it to correct defaults file. Currently the function doesn't lock defaults
file. This is because of the linking and backwards-compatibility issues. This needs to be fixed later.
mysys/my_chsize.c:
comment added
server-tools/instance-manager/buffer.cc:
cleanup
server-tools/instance-manager/commands.cc:
refactoring: removed do_command method from most of the classes
server-tools/instance-manager/commands.h:
cleanup
server-tools/instance-manager/guardian.cc:
cleanup
server-tools/instance-manager/instance.cc:
cleanup
server-tools/instance-manager/instance_map.cc:
cleanup
server-tools/instance-manager/instance_options.cc:
cleanup
server-tools/instance-manager/instance_options.h:
cleanup
server-tools/instance-manager/listener.cc:
cleanup
server-tools/instance-manager/log.cc:
cleanup
server-tools/instance-manager/manager.cc:
cleanup
server-tools/instance-manager/messages.cc:
new errors added
server-tools/instance-manager/mysql_connection.cc:
cleanup
server-tools/instance-manager/mysql_manager_error.h:
new error codes added
server-tools/instance-manager/mysqlmanager.cc:
clenup
server-tools/instance-manager/options.cc:
cleanup
server-tools/instance-manager/parse.cc:
removed unused function
server-tools/instance-manager/parse.h:
removed prototype
server-tools/instance-manager/protocol.cc:
cleanup
server-tools/instance-manager/protocol.h:
added enum to be used in protocol.cc instead of the constants
Diffstat (limited to 'server-tools/instance-manager/parse.cc')
-rw-r--r-- | server-tools/instance-manager/parse.cc | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/server-tools/instance-manager/parse.cc b/server-tools/instance-manager/parse.cc index 8af7c88ece2..fae69375b61 100644 --- a/server-tools/instance-manager/parse.cc +++ b/server-tools/instance-manager/parse.cc @@ -198,9 +198,7 @@ Command *parse_command(Command_factory *factory, const char *text) /* should be empty */ get_word(&text, &word_len); if (word_len) - { goto syntax_error; - } if (skip) command= factory->new_Unset_option(instance_name, instance_name_len, @@ -330,44 +328,3 @@ syntax_error: } return command; } - -/* additional parse function, needed to parse */ - -/* create an array of strings from the output, starting from "word" */ -int parse_arguments(const char *command, const char *word, char *result, - int max_result_cardinality, size_t option_len) -{ - int wordlen; - int i= 0; /* result array index */ - /* should be enough to store the string from the output */ - enum { MAX_LINE_LEN= 4096 }; - char linebuf[MAX_LINE_LEN]; - - wordlen= strlen(word); - - uint lineword_len= 0; - const char *linep= command; - get_word((const char **) &linep, &lineword_len, NONSPACE); - while ((*linep != '\0') && (i < max_result_cardinality)) - { - if (!strncmp(word, linep, wordlen)) - { - strncpy(result + i*option_len, linep, lineword_len); - *(result + i*option_len + lineword_len)= '\0'; - linep+= lineword_len; - i++; - } - else - linep+= lineword_len; - get_word((const char **) &linep, &lineword_len, NONSPACE); - - /* stop if we've filled the array */ - if (i >= max_result_cardinality) - break; - } - - - return 0; -} - - |