summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2012-08-17 18:02:44 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2012-08-17 18:02:44 +0300
commit61f064eb6d69e4c5116ee1f7d56c67c5fad9477c (patch)
treedc059ed266c9bf5d7485e32de2bfd52c7f73d1d4
parentb2529335511c3c1dafefd914ac5ea24014a58312 (diff)
downloadmariadb-git-61f064eb6d69e4c5116ee1f7d56c67c5fad9477c.tar.gz
Bug #14399795 : ISSUES RELATED TO SETTING AUDIT_LOG_STRATEGY
DURING SERVER STARTUP The options parser now correctly checks for ambiguous prefixes in enumerated variables and emits an error when the value supplied is ambiguous. No test added since mysql-test-run.pl can't handle server startup failures as an expected state.
-rw-r--r--mysys/my_getopt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index ac4ae46eab5..2ab9d44893c 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -710,6 +710,11 @@ static int setval(const struct my_option *opts, void *value, char *argument,
}
*(ulong*)value= arg;
}
+ else if (type < 0)
+ {
+ res= EXIT_AMBIGUOUS_OPTION;
+ goto ret;
+ }
else
*(ulong*)value= type - 1;
}