[CP] fix core when update lob to default value in non strict sql mode
This commit is contained in:
2
deps/oblib/src/common/object/ob_object.cpp
vendored
2
deps/oblib/src/common/object/ob_object.cpp
vendored
@ -270,7 +270,7 @@ DEF_TO_STRING(ObLobLocatorV2)
|
||||
int64_t pos = 0;
|
||||
uint32_t offset = 0;
|
||||
J_OBJ_START();
|
||||
J_KV(K_(ptr), K_(size), K_(has_lob_header));
|
||||
J_KV(KP_(ptr), K_(size), K_(has_lob_header));
|
||||
J_COMMA();
|
||||
|
||||
if (OB_ISNULL(ptr_)) {
|
||||
|
||||
@ -4569,7 +4569,9 @@ int ObLSTabletService::process_lob_row(
|
||||
// get new lob locator
|
||||
ObString new_lob_str = (new_obj.is_null() || new_obj.is_nop_value())
|
||||
? ObString(0, nullptr) : new_obj.get_string();
|
||||
ObLobLocatorV2 new_lob(new_lob_str, new_obj.has_lob_header());
|
||||
// for not strict sql mode, will insert empty string without lob header
|
||||
bool has_lob_header = new_obj.has_lob_header() && new_lob_str.length() > 0;
|
||||
ObLobLocatorV2 new_lob(new_lob_str, has_lob_header);
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (new_obj.is_null() ||
|
||||
new_obj.is_nop_value() ||
|
||||
|
||||
Reference in New Issue
Block a user