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) ...@@ -1294,11 +1294,14 @@ void JSONCOL::SetJsonValue(PGLOBAL g, PVAL vp, PJVAL val, int n)
// } // endif Type // } // endif Type
default: default:
vp->Reset();
vp->SetNull(true); vp->SetNull(true);
} // endswitch Type } // endswitch Type
} else } else {
vp->Reset();
vp->SetNull(true); vp->SetNull(true);
} // endif val
} // end of SetJsonValue } // end of SetJsonValue
...@@ -1311,8 +1314,8 @@ void JSONCOL::ReadColumn(PGLOBAL g) ...@@ -1311,8 +1314,8 @@ void JSONCOL::ReadColumn(PGLOBAL g)
Value->SetValue_pval(GetColumnValue(g, Tjp->Row, 0)); Value->SetValue_pval(GetColumnValue(g, Tjp->Row, 0));
// Set null when applicable // Set null when applicable
if (Nullable) if (!Nullable)
Value->SetNull(Value->IsNull()); Value->SetNull(false);
} // end of ReadColumn } // 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