From a80e04dea7479cf036dc8d9bf5cd8b70022a2c1d Mon Sep 17 00:00:00 2001 From: jingtaoye35 <1255153887@qq.com> Date: Mon, 17 Jun 2024 17:28:26 +0000 Subject: [PATCH] occupy sm3 and sm4 function type --- deps/oblib/src/lib/ob_name_def.h | 3 +++ src/objit/include/objit/common/ob_item_type.h | 3 +++ src/sql/engine/expr/ob_expr_eval_functions.cpp | 3 +++ 3 files changed, 9 insertions(+) diff --git a/deps/oblib/src/lib/ob_name_def.h b/deps/oblib/src/lib/ob_name_def.h index 2bb315da82..d01cdc9700 100644 --- a/deps/oblib/src/lib/ob_name_def.h +++ b/deps/oblib/src/lib/ob_name_def.h @@ -662,6 +662,9 @@ #define N_GET_SUBPROGRAM_VAR "get_subprogram_var" #define N_SHADOW_UK_PROJECTOR "shadow_uk_project" #define N_RANDOM_BYTES "random_bytes" +#define N_SM3 "sm3" +#define N_SM4_ENCRYPT "sm4_encrypt" +#define N_SM4_DECRYPT "sm4_decrypt" //use capital as 'default now()' flag #define N_UPPERCASE_CUR_TIMESTAMP "CURRENT_TIMESTAMP" #define N_UPDATE_CURRENT_TIMESTAMP "ON UPDATE CURRENT_TIMESTAMP" diff --git a/src/objit/include/objit/common/ob_item_type.h b/src/objit/include/objit/common/ob_item_type.h index 2d50df43f8..9aa5bbb9b8 100755 --- a/src/objit/include/objit/common/ob_item_type.h +++ b/src/objit/include/objit/common/ob_item_type.h @@ -506,6 +506,9 @@ typedef enum ObItemType T_FUN_SYS_PASSWORD = 773, T_FUN_SYS_IS_ENABLED_ROLE = 774, T_FUN_SYS_CAN_ACCESS_TRIGGER = 775, + T_FUN_SYS_SM3 = 776, + T_FUN_SYS_SM4_ENCRYPT = 777, + T_FUN_SYS_SM4_DECRYPT = 778, ///< @note add new mysql only function type before this line T_MYSQL_ONLY_SYS_MAX_OP = 800, diff --git a/src/sql/engine/expr/ob_expr_eval_functions.cpp b/src/sql/engine/expr/ob_expr_eval_functions.cpp index dbadee2c45..2bda39b26f 100644 --- a/src/sql/engine/expr/ob_expr_eval_functions.cpp +++ b/src/sql/engine/expr/ob_expr_eval_functions.cpp @@ -1209,6 +1209,9 @@ static ObExpr::EvalFunc g_expr_eval_functions[] = { NULL, // ObExprVectorDistance::calc_distance, /* 727 */ NULL, // ObExprInnerDoubleToInt::eval_inner_double_to_int /* 728 */ NULL, // ObExprInnerDecimalToYear::eval_inner_decimal_to_year /* 729 */ + NULL, // ObExprSm3::eval_sm3, /* 730 */ + NULL, // ObExprSm4Encrypt::eval_sm4_encrypt, /* 731 */ + NULL, // ObExprSm4Decrypt::eval_sm4_decrypt, /* 732 */ }; static ObExpr::EvalBatchFunc g_expr_eval_batch_functions[] = {