Commit ea7081bf authored by Olivier Bertrand's avatar Olivier Bertrand

Fix wrong value of JSON column

When null and the column is NOT NULL the value was not reset.
  modified:   storage/connect/tabjson.cpp
parent 2195f5dc
......@@ -1294,11 +1294,14 @@ void JSONCOL::SetJsonValue(PGLOBAL g, PVAL vp, PJVAL val, int n)
// } // endif Type
default:
vp->Reset();
vp->SetNull(true);
} // endswitch Type
} else
} else {
vp->Reset();
vp->SetNull(true);
} // endif val
} // end of SetJsonValue
......@@ -1311,8 +1314,8 @@ void JSONCOL::ReadColumn(PGLOBAL g)
Value->SetValue_pval(GetColumnValue(g, Tjp->Row, 0));
// Set null when applicable
if (Nullable)
Value->SetNull(Value->IsNull());
if (!Nullable)
Value->SetNull(false);
} // end of ReadColumn
......
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