mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
fix compile error on hp-ux setenv->putenv
print slave port as well client/mysqltest.c: fix compile error on hp-ux setenv->putenv mysql-test/mysql-test-run.sh: print slave port as well
This commit is contained in:
@ -273,6 +273,7 @@ typedef struct
|
|||||||
int alloced_len;
|
int alloced_len;
|
||||||
int int_dirty; /* do not update string if int is updated until first read */
|
int int_dirty; /* do not update string if int is updated until first read */
|
||||||
int alloced;
|
int alloced;
|
||||||
|
char *env_s;
|
||||||
} VAR;
|
} VAR;
|
||||||
|
|
||||||
#if defined(__NETWARE__) || defined(__WIN__)
|
#if defined(__NETWARE__) || defined(__WIN__)
|
||||||
@ -885,16 +886,18 @@ int var_set(const char *var_name, const char *var_name_end,
|
|||||||
|
|
||||||
if (env_var)
|
if (env_var)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024], *old_env_s= v->env_s;
|
||||||
memcpy(buf, v->name, v->name_len);
|
|
||||||
buf[v->name_len]= 0;
|
|
||||||
if (v->int_dirty)
|
if (v->int_dirty)
|
||||||
{
|
{
|
||||||
sprintf(v->str_val, "%d", v->int_val);
|
sprintf(v->str_val, "%d", v->int_val);
|
||||||
v->int_dirty= 0;
|
v->int_dirty= 0;
|
||||||
v->str_val_len= strlen(v->str_val);
|
v->str_val_len= strlen(v->str_val);
|
||||||
}
|
}
|
||||||
setenv(buf, v->str_val, 1);
|
strxmov(buf, v->name, "=", v->str_val, NullS);
|
||||||
|
if (!(v->env_s= my_strdup(buf, MYF(MY_WME))))
|
||||||
|
die("Out of memory");
|
||||||
|
putenv(v->env_s);
|
||||||
|
my_free((gptr)old_env_s, MYF(MY_ALLOW_ZERO_PTR));
|
||||||
}
|
}
|
||||||
DBUG_RETURN(result);
|
DBUG_RETURN(result);
|
||||||
}
|
}
|
||||||
@ -4335,6 +4338,7 @@ static VAR *var_init(VAR *v, const char *name, int name_len, const char *val,
|
|||||||
tmp_var->alloced_len = val_alloc_len;
|
tmp_var->alloced_len = val_alloc_len;
|
||||||
tmp_var->int_val = (val) ? atoi(val) : 0;
|
tmp_var->int_val = (val) ? atoi(val) : 0;
|
||||||
tmp_var->int_dirty = 0;
|
tmp_var->int_dirty = 0;
|
||||||
|
tmp_var->env_s = 0;
|
||||||
return tmp_var;
|
return tmp_var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,6 +250,7 @@ if [ -n "$MTR_BUILD_THREAD" ] ; then
|
|||||||
echo "Using MYSQL_MANAGER_PORT = $MYSQL_MANAGER_PORT"
|
echo "Using MYSQL_MANAGER_PORT = $MYSQL_MANAGER_PORT"
|
||||||
echo "Using SLAVE_MYPORT = $SLAVE_MYPORT"
|
echo "Using SLAVE_MYPORT = $SLAVE_MYPORT"
|
||||||
echo "Using NDBCLUSTER_PORT = $NDBCLUSTER_PORT"
|
echo "Using NDBCLUSTER_PORT = $NDBCLUSTER_PORT"
|
||||||
|
echo "Using NDBCLUSTER_PORT_SLAVE = $NDBCLUSTER_PORT_SLAVE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
NO_SLAVE=0
|
NO_SLAVE=0
|
||||||
|
Reference in New Issue
Block a user