mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Fix wrong value of JSON column
When null and the column is NOT NULL the value was not reset. modified: storage/connect/tabjson.cpp
This commit is contained in:
parent
2195f5dc02
commit
ea7081bfa2
1 changed files with 7 additions and 4 deletions
|
@ -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
|
||||
vp->SetNull(true);
|
||||
} 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
|
||||
|
||||
|
|
Loading…
Reference in a new issue