Commit a89284ba authored by unknown's avatar unknown

Fix mysqltest crash problem


client/mysqltest.c:
  Revert to original version of copying name and value into var in var_init
parent cdf2eb4b
......@@ -4216,10 +4216,12 @@ static VAR *var_init(VAR *v, const char *name, int name_len, const char *val,
if (!(tmp_var->str_val = my_malloc(val_alloc_len+1, MYF(MY_WME))))
die("Out of memory");
if (name)
strmake(tmp_var->name, name, name_len);
memcpy(tmp_var->name, name, name_len);
if (val)
strmake(tmp_var->str_val, val, val_len);
{
memcpy(tmp_var->str_val, val, val_len);
tmp_var->str_val[val_len]= 0;
}
tmp_var->name_len = name_len;
tmp_var->str_val_len = val_len;
tmp_var->alloced_len = val_alloc_len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment