[BUGFIX] fix lob bugs

This commit is contained in:
skylhd
2023-05-19 09:47:30 +00:00
committed by ob-robot
parent ea2c5fc8b2
commit 2cf85600bc
3 changed files with 14 additions and 2 deletions

View File

@ -3324,7 +3324,12 @@ CAST_FUNC_NAME(text, raw)
bool has_set_res = false;
OZ(ObDatumHexUtils::hextoraw_string(expr, in_str, ctx, res_datum, has_set_res));
} else { // blob to raw
res_datum.set_string(in_str.ptr(), in_str.length());
// empty blob treat as null in oracle
if (lib::is_oracle_mode() && in_str.length() == 0) {
res_datum.set_null();
} else {
res_datum.set_string(in_str.ptr(), in_str.length());
}
}
}
return ret;