From 197cd9f26362b8a84510b59e61e0aadbd5532df6 Mon Sep 17 00:00:00 2001 From: MassimilianoPinto Date: Fri, 28 Aug 2015 16:32:33 +0200 Subject: [PATCH] Fix for missing '\'' char detection Fix for missing ' char detection --- server/modules/routing/binlog/blr_slave.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/modules/routing/binlog/blr_slave.c b/server/modules/routing/binlog/blr_slave.c index 3edfad8b4..8c35aa18f 100644 --- a/server/modules/routing/binlog/blr_slave.c +++ b/server/modules/routing/binlog/blr_slave.c @@ -3135,9 +3135,9 @@ blr_set_master_hostname(ROUTER_INSTANCE *router, char *hostname) { ptr = strchr(hostname, '\''); if (ptr) ptr++; - + else + ptr = hostname; end = strchr(ptr, '\''); - if (end) *end ='\0'; @@ -3206,6 +3206,8 @@ blr_set_master_logfile(ROUTER_INSTANCE *router, char *filename, char *error) { file_ptr = strchr(filename, '\''); if (file_ptr) file_ptr++; + else + file_ptr = filename; end = strchr(file_ptr, '\''); if (end) @@ -3395,6 +3397,8 @@ blr_set_master_user(ROUTER_INSTANCE *router, char *user) { ptr = strchr(user, '\''); if (ptr) ptr++; + else + ptr = user; end = strchr(ptr, '\''); if (end) @@ -3430,6 +3434,8 @@ blr_set_master_password(ROUTER_INSTANCE *router, char *password) { ptr = strchr(password, '\''); if (ptr) ptr++; + else + ptr = password; end = strchr(ptr, '\''); if (end)