summaryrefslogtreecommitdiff
path: root/libmysql/libmysql.c
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2003-11-28 20:41:33 +0200
committerunknown <monty@mysql.com>2003-11-28 20:41:33 +0200
commit13f525c080c787af562aa1dd7b60d74889e41378 (patch)
tree8c8c9cce2fe6c946269dfc20e1ecb25d1ef3d0a0 /libmysql/libmysql.c
parent90fc2b973ac11874404ed2c6d6038e7d7c119ead (diff)
downloadmariadb-git-13f525c080c787af562aa1dd7b60d74889e41378.tar.gz
rpl_parse and rpl_probe don't have to be reset as they are already 0
Diffstat (limited to 'libmysql/libmysql.c')
-rw-r--r--libmysql/libmysql.c42
1 files changed, 23 insertions, 19 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 763288a5e83..6abc29d29f4 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -2256,29 +2256,33 @@ static MYSQL* spawn_init(MYSQL* parent, const char* host,
const char* passwd)
{
MYSQL* child;
- if (!(child = mysql_init(0)))
- return 0;
+ DBUG_ENTER("spawn_init");
+ if (!(child= mysql_init(0)))
+ DBUG_RETURN(0);
- child->options.user = my_strdup((user) ? user :
- (parent->user ? parent->user :
- parent->options.user), MYF(0));
- child->options.password = my_strdup((passwd) ? passwd :
- (parent->passwd ?
- parent->passwd :
- parent->options.password), MYF(0));
- child->options.port = port;
- child->options.host = my_strdup((host) ? host :
- (parent->host ?
- parent->host :
- parent->options.host), MYF(0));
+ child->options.user= my_strdup((user) ? user :
+ (parent->user ? parent->user :
+ parent->options.user), MYF(0));
+ child->options.password= my_strdup((passwd) ? passwd :
+ (parent->passwd ?
+ parent->passwd :
+ parent->options.password), MYF(0));
+ child->options.port= port;
+ child->options.host= my_strdup((host) ? host :
+ (parent->host ?
+ parent->host :
+ parent->options.host), MYF(0));
if (parent->db)
- child->options.db = my_strdup(parent->db, MYF(0));
+ child->options.db= my_strdup(parent->db, MYF(0));
else if (parent->options.db)
- child->options.db = my_strdup(parent->options.db, MYF(0));
-
- child->options.rpl_parse = child->options.rpl_probe = child->rpl_pivot = 0;
+ child->options.db= my_strdup(parent->options.db, MYF(0));
- return child;
+ /*
+ rpl_pivot is set to 1 in mysql_init(); Reset it as we are not doing
+ replication here
+ */
+ child->rpl_pivot= 0;
+ DBUG_RETURN(child);
}