fix some bugs

This commit is contained in:
wangt1xiuyi
2023-04-22 14:20:35 +00:00
committed by ob-robot
parent 73ba439d2e
commit 27783b2352
11 changed files with 95 additions and 41 deletions

View File

@ -930,6 +930,12 @@ int ObParser::parse_sql(const ObString &stmt,
LOG_WARN("failed to fast parameterize", K(stmt), K(ret));
}
}
if (OB_SUCC(ret) &&
parse_result.enable_compatible_comment_ &&
parse_result.mysql_compatible_comment_) {
ret = OB_ERR_PARSE_SQL;
LOG_WARN("the sql is invalid", K(ret), K(stmt));
}
if (OB_FAIL(ret) && !no_throw_parser_error) {
auto err_charge_sql_mode = lib::is_oracle_mode();
LOG_WARN("failed to parse the statement",

View File

@ -306,7 +306,7 @@ do {
} else if (OB_UNLIKELY(!result->pl_parse_info_.is_pl_parse_ && 0 != result->question_mark_ctx_.count_)) { \
/* 如果是PL过来的sql语句,不要检查:*/ \
yyerror(NULL, result, "Unknown column '?'\n"); \
YYABORT_UNEXPECTED; \
YYABORT_PARSE_SQL_ERROR; \
} else { \
node->value_ = result->question_mark_ctx_.count_; \
} \