summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsvensson@neptunus.(none) <>2006-01-10 14:56:46 +0100
committermsvensson@neptunus.(none) <>2006-01-10 14:56:46 +0100
commit5a9b31e94098d284b8c26213c0ff3c853d578e15 (patch)
tree58c6224d1ad407b37d0c747a6712bbd5246625ca
parent12fcc10533809f8306a9bfed2bc7a6b189a80b05 (diff)
parentb10bed08ce0f15b41499cb48f7711c899c4dde5c (diff)
downloadmariadb-git-5a9b31e94098d284b8c26213c0ff3c853d578e15.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/wl2930/my50-wl2930-integration
into neptunus.(none):/home/msvensson/mysql/wl2930/my51-wl2930-integration
-rw-r--r--client/mysqltest.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index dbb910c2e3d..c6bc9edd453 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -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;