summaryrefslogtreecommitdiff
path: root/storage/connect/value.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2015-01-23 17:54:53 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2015-01-23 17:54:53 +0100
commitdc091a29352bf034ce699395f26a939020c9422e (patch)
tree0fd65ef8802e1ee5771c71c879b1c83cb3905764 /storage/connect/value.cpp
parente57677238379624fc4aa1ff5b2852acfad5c2372 (diff)
downloadmariadb-git-dc091a29352bf034ce699395f26a939020c9422e.tar.gz
- Fix MDEV-7489 (in add_field)
modified: storage/connect/ha_connect.cc - Fix MDEV-7494 (adding Insert_quoted in the STRING class) modified: storage/connect/tabmysql.cpp storage/connect/xobject.cpp storage/connect/xobject.h - Fix MDEV-7498 in value.cpp (AllocateValue) modified: storage/connect/value.cpp - Handle backslash in Json serialize + uchar + typo. modified: storage/connect/json.cpp storage/connect/tabjson.cpp
Diffstat (limited to 'storage/connect/value.cpp')
-rw-r--r--storage/connect/value.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp
index 1cc40473433..e80c31a2baa 100644
--- a/storage/connect/value.cpp
+++ b/storage/connect/value.cpp
@@ -443,8 +443,13 @@ PVAL AllocateValue(PGLOBAL g, PVAL valp, int newtype, int uns)
case TYPE_STRING:
p = (PSZ)PlugSubAlloc(g, NULL, 1 + valp->GetValLen());
- if ((sp = valp->GetCharString(p)) != p)
- strcpy (p, sp);
+ if ((sp = valp->GetCharString(p)) != p) {
+ if (sp)
+ strcpy (p, sp);
+ else
+ *p = 0;
+
+ } // endif sp
vp = new(g) TYPVAL<PSZ>(g, p, valp->GetValLen(), valp->GetValPrec());
break;