fix some compatible bugs

This commit is contained in:
wangt1xiuyi
2023-10-24 12:40:14 +00:00
committed by ob-robot
parent 38bb43ae14
commit cfd2e2edc0
4 changed files with 13 additions and 3 deletions

View File

@ -1072,6 +1072,11 @@ int ObParser::parse(const ObString &query,
}
}
if (OB_SUCC(ret) && stmt.empty()) {
ret = OB_ERR_EMPTY_QUERY;
LOG_WARN("query is empty", K(ret));
}
if (OB_SUCC(ret) && (parse_result.is_fp_ || parse_result.is_dynamic_sql_)) {
int64_t new_length = parse_result.is_fp_ ? stmt.length() + 1 : stmt.length() * 2;
char *buf = (char *)parse_malloc(new_length, parse_result.malloc_pool_);