Support uuid_short in mysql mode.

This commit is contained in:
al0
2021-11-30 11:13:10 +08:00
committed by LINxiansheng
parent d06570baf4
commit e28151b107
9 changed files with 143 additions and 4 deletions

View File

@ -493,7 +493,8 @@ bool ObRawExpr::is_non_pure_sys_func_expr() const
T_FUN_SYS_UNIX_TIMESTAMP == type_ || T_FUN_SYS_UTC_TIMESTAMP == type_ || T_FUN_SYS_RAND == type_ ||
T_FUN_SYS_UUID == type_ || T_FUN_SYS_SLEEP == type_ || T_FUN_SYS_LAST_INSERT_ID == type_ ||
T_FUN_SYS_ROW_COUNT == type_ || T_FUN_SYS_FOUND_ROWS == type_ || T_FUN_SYS_REGEXP_INSTR == type_ ||
T_FUN_SYS_REGEXP_LIKE == type_ || T_FUN_SYS_REGEXP_REPLACE == type_ || T_FUN_SYS_REGEXP_SUBSTR == type_) {
T_FUN_SYS_REGEXP_LIKE == type_ || T_FUN_SYS_REGEXP_REPLACE == type_ || T_FUN_SYS_REGEXP_SUBSTR == type_ ||
T_FUN_SYS_UUID_SHORT == type_) {
return true;
}
}

View File

@ -155,7 +155,8 @@ int ObRawExprInfoExtractor::add_const(ObRawExpr& expr)
CONST_ACTION(param_expr);
}
if (is_const_expr &&
(T_FUN_SYS_RAND == expr.get_expr_type() || T_FUN_SYS_SEQ_NEXTVAL == expr.get_expr_type() ||
(T_FUN_SYS_RAND == expr.get_expr_type() || T_FUN_SYS_UUID == expr.get_expr_type() ||
T_FUN_SYS_UUID_SHORT == expr.get_expr_type() || T_FUN_SYS_SEQ_NEXTVAL == expr.get_expr_type() ||
T_FUN_SYS_AUTOINC_NEXTVAL == expr.get_expr_type() || T_FUN_SYS_ROWNUM == expr.get_expr_type() ||
T_FUN_SYS_ROWKEY_TO_ROWID == expr.get_expr_type() || T_OP_CONNECT_BY_ROOT == expr.get_expr_type() ||
T_FUN_SYS_CONNECT_BY_PATH == expr.get_expr_type() || T_FUN_SYS_GUID == expr.get_expr_type() ||
@ -502,7 +503,8 @@ int ObRawExprInfoExtractor::visit(ObSysFunRawExpr& expr)
if (OB_FAIL(expr.add_flag(IS_RAND_FUNC))) {
LOG_WARN("failed to add flag IS_RAND_FUNC", K(ret));
}
} else if (T_FUN_SYS_GUID == expr.get_expr_type() || T_FUN_SYS_UUID == expr.get_expr_type()) {
} else if (T_FUN_SYS_GUID == expr.get_expr_type() || T_FUN_SYS_UUID == expr.get_expr_type() ||
T_FUN_SYS_UUID_SHORT == expr.get_expr_type()) {
if (OB_FAIL(expr.add_flag(IS_RAND_FUNC))) {
LOG_WARN("failed to add flag IS_RAND_FUNC", K(ret));
}