399 Star 1.3K Fork 1.5K

GVPopenGauss / openGauss-server

 / 详情

【全密态数据库】cte查询加密表通过where过滤返回结果,报错不支持的运算符

待办的
缺陷
创建于  
2024-04-16 18:49

【标题描述】:【全密态数据库】cte查询加密表通过where过滤返回结果,报错不支持的运算符
【测试类型:安全】【测试版本:6.0.0】 问题描述【全密态数据库】cte查询加密表通过where过滤返回结果,报错不支持的运算符

【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):
输入图片说明
【测试环境】(单机/1主x备x级联备):
单机
【被测功能】:
全密态数据库
【测试类型】:
安全
【数据库版本】(查询命令: gaussdb -V):
输入图片说明
【预置条件】:
gsql -d postgres -r -C
drop table test1;
drop table test2;
DROP COLUMN ENCRYPTION KEY ImgCEK cascade;
DROP CLIENT MASTER KEY ImgCMK cascade;
CREATE CLIENT MASTER KEY ImgCMK WITH (KEY_STORE = localkms, KEY_PATH = "key_path_value2", ALGORITHM = RSA_3072);
CREATE COLUMN ENCRYPTION KEY ImgCEK WITH VALUES (CLIENT_MASTER_KEY = ImgCMK, ALGORITHM = AEAD_AES_128_CBC_HMAC_SHA256);

--1、创建测试表并插入数据
create table test1(id int encrypted with(column_encryption_key=ImgCEK,encryption_type=DETERMINISTIC),name text default 'testaaa',c3 text not null);
create table test2(id int encrypted with(column_encryption_key=ImgCEK,encryption_type=DETERMINISTIC),name text default 'testaaa',c3 text not null);
insert into test1 values(1,'asdfghjkl','a'),(2,null,'b'),(null,'','c');
insert into test2 values(1,'qazwsxedc','a');
【操作步骤】(请填写详细的操作步骤):

  1. 查询
    WITH tmp AS (
    select * from test1
    )
    SELECT
  • from tmp where id=1;

【预期输出】:
执行成功
【实际输出】:
执行报错,未进行类型转换,提示操作符不存在
输入图片说明
【原因分析】:

  1. 这个问题的根因
  2. 问题推断过程
  3. 还有哪些原因可能造成类似现象
  4. 该问题是否有临时规避措施
  5. 问题解决方案
  6. 预计修复问题时间

【日志信息】(请附上日志文件、截图、coredump信息):

【测试代码】:

评论 (2)

dkm997 创建了缺陷

Hey @dkm997, Welcome to openGauss Community.
All of the projects in openGauss Community are maintained by @opengauss_bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at Here to find the details.

Hi @dkm997, please use the command /sig xxx to add a SIG label to this issue.
For example: /sig sqlengine or /sig storageengine or /sig om or /sig ai and so on.
You can find more SIG labels from Here.
If you have no idea about that, please contact with @xiangxinyong , @zhangxubo .

王恬静 关联项目设置为openGauss 6.0.0 community
王恬静 负责人设置为pengjiong
王恬静 优先级设置为次要
pengjiong 添加协作者pengjiong
pengjiong 负责人pengjiong 修改为陈栋
pengjiong 取消协作者pengjiong
陈栋 添加协作者陈栋
陈栋 负责人陈栋 修改为songlinxuan
songlinxuan 修改了备注
songlinxuan 计划截止日期设置为2024-05-10

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
13084139 opengauss bot 1686829535
C++
1
https://gitee.com/opengauss/openGauss-server.git
git@gitee.com:opengauss/openGauss-server.git
opengauss
openGauss-server
openGauss-server

搜索帮助