fix some bugs
This commit is contained in:
@ -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",
|
||||
|
||||
@ -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_; \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user