[fix] json not strict mode insert

This commit is contained in:
xj0
2022-02-28 20:16:09 +08:00
committed by LINxiansheng
parent 0b3eff2515
commit c856bc403e
2 changed files with 7 additions and 1 deletions

View File

@ -996,6 +996,10 @@ int ObMySQLUtil::json_cell_str(char *buf, const int64_t len, const ObString &val
if (OB_ISNULL(buf)) {
ret = OB_INVALID_ARGUMENT;
OB_LOG(WARN, "invalid input args", K(ret), KP(buf));
} else if (val.length() == 0) {
if (OB_FAIL(ObMySQLUtil::store_null(buf, len, pos))) {
OB_LOG(WARN, "fail to set null string", K(pos), K(len));
}
} else if (OB_FAIL(j_bin.reset_iter())) {
OB_LOG(WARN, "fail to reset json bin iter", K(ret), K(val));
} else if (OB_FAIL(j_base->print(jbuf, true))) {