[fix] json not strict mode insert
This commit is contained in:
4
deps/oblib/src/common/object/ob_obj_funcs.h
vendored
4
deps/oblib/src/common/object/ob_obj_funcs.h
vendored
@ -1423,7 +1423,9 @@ DEF_TEXT_FUNCS(ObLongTextType, string, ObString);
|
|||||||
uint64_t hash_res = 0; \
|
uint64_t hash_res = 0; \
|
||||||
ObJsonBin j_bin(j_bin_str.ptr(), j_bin_str.length()); \
|
ObJsonBin j_bin(j_bin_str.ptr(), j_bin_str.length()); \
|
||||||
ObIJsonBase *j_base = &j_bin; \
|
ObIJsonBase *j_base = &j_bin; \
|
||||||
if (OB_FAIL(j_bin.reset_iter())) { \
|
if (j_bin_str.length() ==0 || param.is_null()) { \
|
||||||
|
hash_res = hash; \
|
||||||
|
} else if (OB_FAIL(j_bin.reset_iter())) { \
|
||||||
COMMON_LOG(WARN, "fail to reset json bin iter", K(ret), K(j_bin_str)); \
|
COMMON_LOG(WARN, "fail to reset json bin iter", K(ret), K(j_bin_str)); \
|
||||||
right_to_die_or_duty_to_live(); \
|
right_to_die_or_duty_to_live(); \
|
||||||
} else if (OB_FAIL(j_base->calc_json_hash_value(hash, T::hash, hash_res))) { \
|
} else if (OB_FAIL(j_base->calc_json_hash_value(hash, T::hash, hash_res))) { \
|
||||||
|
4
deps/oblib/src/rpc/obmysql/ob_mysql_util.cpp
vendored
4
deps/oblib/src/rpc/obmysql/ob_mysql_util.cpp
vendored
@ -996,6 +996,10 @@ int ObMySQLUtil::json_cell_str(char *buf, const int64_t len, const ObString &val
|
|||||||
if (OB_ISNULL(buf)) {
|
if (OB_ISNULL(buf)) {
|
||||||
ret = OB_INVALID_ARGUMENT;
|
ret = OB_INVALID_ARGUMENT;
|
||||||
OB_LOG(WARN, "invalid input args", K(ret), KP(buf));
|
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())) {
|
} else if (OB_FAIL(j_bin.reset_iter())) {
|
||||||
OB_LOG(WARN, "fail to reset json bin iter", K(ret), K(val));
|
OB_LOG(WARN, "fail to reset json bin iter", K(ret), K(val));
|
||||||
} else if (OB_FAIL(j_base->print(jbuf, true))) {
|
} else if (OB_FAIL(j_base->print(jbuf, true))) {
|
||||||
|
Reference in New Issue
Block a user