summaryrefslogtreecommitdiff
path: root/storage/connect/tabjson.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2017-10-16 15:08:17 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2017-10-16 15:08:17 +0200
commitc83e2a63452946cf58241380f03a23ab4884c42b (patch)
treed0bbb84f9a6110ca1346c4ba14003276dca0a728 /storage/connect/tabjson.cpp
parent6691d12e2d5d0aa26353ddca143067edf4cf56d5 (diff)
downloadmariadb-git-c83e2a63452946cf58241380f03a23ab4884c42b.tar.gz
- Fix a bug in TYPVAL<PSZ> compute causing it sometime not to be executed
This was the cause of the bug in CalculateArray modified: storage/connect/jsonudf.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/value.cpp - Avoid some compiler warnings modified: storage/connect/mongo.cpp modified: storage/connect/tabjmg.cpp modified: storage/connect/tabtbl.cpp modified: storage/connect/tabutil.cpp
Diffstat (limited to 'storage/connect/tabjson.cpp')
-rw-r--r--storage/connect/tabjson.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp
index 24881aae415..8778b7d4b47 100644
--- a/storage/connect/tabjson.cpp
+++ b/storage/connect/tabjson.cpp
@@ -1592,16 +1592,14 @@ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n)
ars = MY_MIN(Tjp->Limit, arp->size());
if (trace)
- htrc("CalculateArray size=%d op=%d nextsame=%d\n", ars, op, nextsame);
- else // This seems to prevent a bug in zip.test
- htrc("");
+ htrc("CalculateArray: size=%d op=%d nextsame=%d\n",
+ ars, op, nextsame);
for (i = 0; i < ars; i++) {
jvrp = arp->GetValue(i);
if (trace)
- htrc("i=%d Value %s null=%d nv=%d\n",
- i, jvrp->GetString(g), jvrp->IsNull() ? 1 : 0, nv);
+ htrc("i=%d nv=%d\n", i, nv);
if (!jvrp->IsNull() || (op == OP_CNC && GetJsonNull())) do {
if (jvrp->IsNull()) {
@@ -1623,7 +1621,7 @@ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n)
continue;
} else
SetJsonValue(g, MulVal, jvp, n);
-
+
if (!MulVal->IsNull()) {
switch (op) {
case OP_CNC:
@@ -1655,6 +1653,7 @@ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n)
htrc("vp='%s' err=%d\n",
vp->GetCharString(&buf), err ? 1 : 0);
+
} // endif trace
} // endif Null