cherry-pick bug fix in 3.1

This commit is contained in:
bf0
2021-07-21 23:46:35 +08:00
committed by wangzelin.wzl
parent d49f1baf7d
commit 7fb21bbbe7
23 changed files with 450 additions and 208 deletions

View File

@ -2397,5 +2397,21 @@ int ObStringScanner::next_character(ObString& encoding, int32_t& wchar)
return ret;
}
} // namespace common
} // namespace oceanbase
bool ObStringScanner::next_character(ObString &encoding, int32_t &wchar, int &ret)
{
bool has_next = false;
ret = next_character(encoding, wchar);
if (OB_ITER_END == ret) {
has_next = false;
ret = OB_SUCCESS;
} else if (OB_SUCC(ret)) {
has_next = true;
} else {
LOG_WARN("fail to get next character", K(ret), K(*this));
has_next = false;
}
return has_next;
}
} // namespace common
} // namespace oceanbase