[CP] Fix bug for last_insert_id()

This commit is contained in:
2149
2023-06-14 02:48:20 +00:00
committed by ob-robot
parent 435d6eb508
commit 90c2c33118
9 changed files with 274 additions and 40 deletions

View File

@ -745,7 +745,7 @@ int ObRawExpr::is_const_inherit_expr(bool &is_const_inherit,
|| T_FUN_NORMAL_UDF == type_
|| T_FUN_SYS_REMOVE_CONST == type_
|| T_FUN_SYS_WRAPPER_INNER == type_
|| T_FUN_SYS_LAST_INSERT_ID == type_
|| (T_FUN_SYS_LAST_INSERT_ID == type_ && get_param_count() > 0)
|| T_FUN_SYS_TO_BLOB == type_
|| (T_FUN_SYS_SYSDATE == type_ && lib::is_mysql_mode())
|| (param_need_replace ? is_not_calculable_expr() : cnt_not_calculable_expr())

View File

@ -470,7 +470,7 @@ int ObRawExprInfoExtractor::visit(ObSysFunRawExpr &expr)
if (T_FUN_SYS_AUTOINC_NEXTVAL == expr.get_expr_type()
|| T_FUN_SYS_TABLET_AUTOINC_NEXTVAL == expr.get_expr_type()
|| T_FUN_SYS_SLEEP == expr.get_expr_type()
|| T_FUN_SYS_LAST_INSERT_ID == expr.get_expr_type()
|| (T_FUN_SYS_LAST_INSERT_ID == expr.get_expr_type() && expr.get_param_count() > 0)
|| T_FUN_SYS_PART_ID == expr.get_expr_type()
|| T_OP_GET_PACKAGE_VAR == expr.get_expr_type()
|| T_OP_GET_SUBPROGRAM_VAR == expr.get_expr_type()