summaryrefslogtreecommitdiff
path: root/client/mysqltest.c
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-04-05 19:04:34 -0600
committerunknown <sasha@mysql.sashanet.com>2001-04-05 19:04:34 -0600
commit96c3bd94327cd920985724c8d2799a952ea4bf57 (patch)
tree6d93316a19092ccce1647ddfbb727d57b84ee96a /client/mysqltest.c
parent3b91fce6b897ede7f43daec50433559c9a3eac51 (diff)
downloadmariadb-git-96c3bd94327cd920985724c8d2799a952ea4bf57.tar.gz
moved bdb/innobase to compile-pentium-debug-max
fixed bug in variable assignment in mysqltest fixed coredump on conversion from empty blob/text to date added test case for empty blob conversion to date BUILD/compile-pentium-debug: move bdb/innobase to compile-pentium-debug-max client/mysqltest.c: fixed bug in variable assignment sql/time.cc: fixed coredump on conversion from empty blob/text to date
Diffstat (limited to 'client/mysqltest.c')
-rw-r--r--client/mysqltest.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index d354bbbca01..10095bbf7df 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -241,8 +241,8 @@ static void do_eval(DYNAMIC_STRING* query_eval, const char* query)
else
{
if(!(v = var_get(p, &p, 0)))
- die("Bad variabled in eval");
- dynstr_append(query_eval, v->str_val);
+ die("Bad variable in eval");
+ dynstr_append_mem(query_eval, v->str_val, v->str_val_len);
}
break;
case '\\':
@@ -436,6 +436,7 @@ VAR* var_get(const char* var_name, const char** var_name_end, int raw)
{
sprintf(v->str_val, "%d", v->int_val);
v->int_dirty = 0;
+ v->str_val_len = strlen(v->str_val);
}
if(var_name_end)
*var_name_end = var_name ;
@@ -475,7 +476,7 @@ int var_set(char* var_name, char* var_name_end, char* var_val,
die("Out of memory");
}
memcpy(v->str_val, var_val, val_len-1);
- v->str_val_len = val_len;
+ v->str_val_len = val_len - 1;
v->str_val[val_len] = 0;
v->int_val = atoi(v->str_val);
return 0;