summaryrefslogtreecommitdiff
path: root/mysys/my_getopt.c
diff options
context:
space:
mode:
authorSachin <sachin.setiya@mariadb.com>2018-12-20 04:44:04 +0530
committerSachin <sachin.setiya@mariadb.com>2018-12-20 04:46:10 +0530
commitf8fe84392dce5185d795cdc2cafe28911e5b530c (patch)
tree20f9bf7d7bbf0b25a7e744b136b558c7754665ac /mysys/my_getopt.c
parentdc9d3d08bc6a7cc3ba6b7fb68c4c433d86e2195c (diff)
downloadmariadb-git-bb-10.1-15839.tar.gz
MDEV-15839 replicate-filter for a connection name with a dotbb-10.1-15839
In replication channel name we can have name like a.b.c.replicate_do_db so instead of going for first '.' we should go for the '.' just before '=', Which is actual key_name
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r--mysys/my_getopt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 57b28d1fd8a..df52b753666 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -661,9 +661,13 @@ static char *check_struct_option(char *cur_arg, char *key_name)
char *ptr, *end;
DBUG_ENTER("check_struct_option");
- ptr= strcend(cur_arg + 1, '.'); /* Skip the first character */
end= strcend(cur_arg, '=');
+ /* In replicate_do_db* we can have connection name with .*/
+ ptr= strcend(cur_arg + 1, '.'); /* Skip the first character */
+ while (strcend(ptr + 1, '.') < end)
+ ptr= strcend(ptr + 1, '.');
+
/*
If the first dot is after an equal sign, then it is part
of a variable value and the option is not a struct option.