fix: json column default value(3.1_opensource)

This commit is contained in:
obdev
2022-07-20 11:32:34 +08:00
committed by wangzelin.wzl
parent af654e3a43
commit 1b88c27061
2 changed files with 34 additions and 11 deletions

View File

@ -276,6 +276,7 @@ DEF_TO_STRING(ObLobLocator)
const char* ObObj::MIN_OBJECT_VALUE_STR = "__OB__MIN__";
const char* ObObj::MAX_OBJECT_VALUE_STR = "__OB__MAX__";
const char* ObObj::NOP_VALUE_STR = "__OB__NOP__";
const char OB_JSON_NULL[2] = {'\0', '\0'}; // binary json null
OB_SERIALIZE_MEMBER(ObDataType, meta_, accuracy_, is_zero_fill_);
OB_SERIALIZE_MEMBER(ObEnumSetInnerValue, numberic_value_, string_value_);
@ -458,12 +459,14 @@ int ObObj::build_not_strict_default_value()
case ObTinyTextType:
case ObTextType:
case ObMediumTextType:
case ObLongTextType:
case ObJsonType: {
case ObLongTextType: {
ObString null_str;
set_string(data_type, null_str);
meta_.set_lob_inrow();
} break;
case ObJsonType: {
set_json_value(data_type, OB_JSON_NULL, 2);
} break;
case ObBitType:
set_bit(0);
break;