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

@ -458,7 +458,7 @@ int ObOptStatSqlService::update_column_stat(share::schema::ObSchemaGetterGuard *
ObSqlString insert_histogram;
ObSqlString delete_histogram;
ObSqlString column_stats_sql;
ObArenaAllocator allocator(ObModIds::OB_BUFFER);
ObArenaAllocator allocator("UpdateColStat", OB_MALLOC_NORMAL_BLOCK_SIZE, exec_tenant_id);
bool need_histogram = false;
if (!inited_) {
ret = OB_NOT_INIT;

View File

@ -743,8 +743,9 @@ int ObSql::fill_select_result_set(ObResultSet &result_set, ObSqlCtx *context, co
if ((T_FUN_SET_TO_STR != expr->get_expr_type() &&
T_FUN_ENUM_TO_STR != expr->get_expr_type()) &&
(T_FUN_SYS_CALC_UROWID == expr->get_expr_type() ||
ObCharset::case_insensitive_equal(OB_HIDDEN_LOGICAL_ROWID_COLUMN_NAME,
static_cast<ObColumnRefRawExpr *>(expr)->get_column_name()))) {
(lib::is_oracle_mode() &&
ObCharset::case_insensitive_equal(OB_HIDDEN_LOGICAL_ROWID_COLUMN_NAME,
static_cast<ObColumnRefRawExpr *>(expr)->get_column_name())))) {
//Although the current implement of rowid does not use mock a column schema, it should
//be as normal column when displayed externally.
if (T_FUN_SYS_CALC_UROWID == expr->get_expr_type()) {

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_);

View File

@ -8900,6 +8900,10 @@ NAME_OB
{
malloc_non_terminal_node($$, result->malloc_pool_, T_LINK_NODE, 2, $1, $3);
}
| unreserved_keyword
{
get_non_reserved_node($$, result->malloc_pool_, @1.first_column, @1.last_column);
}
;
hint_option: