修复Int8类型,当数据超过int4范围时,语法树解析为float导致解密错误

This commit is contained in:
blue-lemon0104
2026-04-17 11:36:22 +08:00
parent 37595bd51b
commit 675146e477
2 changed files with 136 additions and 55 deletions

View File

@@ -7,14 +7,16 @@ extern "C" const char *encryptOneSql(const char* sql, char** err_msg, const char
extern "C" void decryptResult(int numberAttr, int numTuples, pAttrDescs pattDescs, pTuples ptuples);
struct EncryptInfo {
const char *sql; // 正在处理的sql
bool isFloatCol; //当前处理的col是否是float
// bool isFloatorIntCol; //当前处理的col是否是float或int
void *father;
bool isPeerColFloat; // where col_float = 10; 这种where条件中10的AES需要放缩 isPeerColFloat为true表示在一个二元操作符中操作数为float column.
bool isALeftOps;
bool isARightOps;
bool isFromAExpr = false;
bool isFromUpdate = false;
};
struct EncryptInfo {
const char *sql; // 正在处理的sql
bool isFloatCol; //当前处理的col是否是float
bool isInt8Col; // 当前处理的col是否是int8/bigint
// bool isFloatorIntCol; //当前处理的col是否是float或int
void *father;
bool isPeerColFloat; // where col_float = 10; 这种where条件中10的AES需要放缩 isPeerColFloat为true表示在一个二元操作符中操作数为float column.
bool isPeerColInt8; // where col_int8 = 9999999999; 这种where条件中大整数字面量可能被解析成Float节点需要按int8处理.
bool isALeftOps;
bool isARightOps;
bool isFromAExpr = false;
bool isFromUpdate = false;
};