登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
轻量养虾,开箱即用!低 Token + 稳定算力,Gitee & 模力方舟联合出品的 PocketClaw 正式开售!点击了解详情~
代码拉取完成,页面将自动刷新
开源项目
>
数据库相关
>
数据库服务
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
443
Star
1.5K
Fork
1.8K
openGauss
/
openGauss-server
代码
Issues
982
Pull Requests
153
Wiki
统计
流水线
服务
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
开发画像分析
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
【测试类型:SQL功能】【测试版本:7.0.0-RC1】create table .... like .... ustore表结果异常
已验收
#IBO9IY
缺陷
曹戎
创建于
2025-02-24 09:26
<!-- #请认真填写以下信息,否则可能由于无法定位,导致issue无法解决而被取消 --> 【标题描述】: 【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】【测试版本:x.x.x】 问题描述 B库下执行 create table .... like .... ustore表结果异常 【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): 【测试环境】(单机/1主x备x级联备): 单机 【被测功能】: B库create table like 【测试类型】: 【数据库版本】(查询命令: gaussdb -V): 7.0.0 RC1 【预置条件】: 在B库下执行 【操作步骤】(请填写详细的操作步骤): --step1:创建ustore表并创建索引; expect:建表成功 set track_counts to on; set track_activities to on; drop table if exists t_table_0018; create table t_table_0018( col01 int comment '首列', col02 int not null, col03 date default '2000-01-01 00:00:01', col04 varchar(255) unique, col05 varchar(10) check(length(col05)>=5), col06 int ) with (storage_type = ustore); create index i_table_0018_01 on t_table_0018(col05); --step2:向表中插入数据; expect:数据插入成功 insert into t_table_0018 values(1,1,default,'a1','hello',15 / 3); insert into t_table_0018(col02,col04,col05) values(2,'z','he is men'); insert into t_table_0018() values(3,3,default,'a2','hello',99 + 101); insert into t_table_0018() values(4,4,'2022-10-01','a3'); insert t_table_0018() values(5,5,'2022-10-01','a4','hello',100-1); --step3:向表中插入values的默认值; expect:数据插入失败,合理报错error insert into t_table_0018() values(); --step4:向表中插入values的默认值,使用ignore参数; expect:数据插入失败,合理告警warning insert ignore into t_table_0018() values(); --step5:向表中插入数据,列名为null; expect:数据插入失败,合理报错error insert into t_table_0018(null) values (10,10,default,'a10','hello',1); insert into t_table_0018('null') values (11,11,default,'a11','hello',3); insert into t_table_0018("null") values (12,10,default,'a12','hello',5); --step6:查询表数据; expect:查询成功,查得5条数据 select * from t_table_0018; --step7:create table like创建普通表; expect:部分成功,部分合理报错 create table t_table_0018_01 like t_table_0018; desc t_table_0018_01; create table t_table_0018_02 like t_table_0018 including indexes; desc t_table_0018_02; create table t_table_0018_03 like t_table_0018 excluding indexes; desc t_table_0018_03; create table t_table_0018_04 like t_table_0018 including partition; desc t_table_0018_04; create table t_table_0018_05 like t_table_0018 excluding partition; desc t_table_0018_05; create table t_table_0018_06 like t_table_0018 including all; desc t_table_0018_06; create table t_table_0018_07 like t_table_0018 excluding all; desc t_table_0018_07; create table t_table_0018_08 like t_table_0018 including all excluding partition; desc t_table_0018_08; create table t_table_0018_09 like t_table_0018 including all excluding indexes; desc t_table_0018_09; create table t_table_0018_10 like t_table_0018 including all excluding partition excluding indexes; desc t_table_0018_10; create table t_table_0018_11 like t_table_0018 including indexes including partition; desc t_table_0018_11; create table t_table_0018_12 like t_table_0018 excluding indexes excluding partition; desc t_table_0018_12; create table t_table_0018_13 like t_table_0018 including defaults; desc t_table_0018_13; create table t_table_0018_14 like t_table_0018 excluding defaults; desc t_table_0018_14; create table t_table_0018_15 like t_table_0018 including constraints; desc t_table_0018_15; create table t_table_0018_16 like t_table_0018 excluding constraints; desc t_table_0018_16; create table t_table_0018_17 like t_table_0018 including storage; desc t_table_0018_17; create table t_table_0018_18 like t_table_0018 excluding storage; desc t_table_0018_18; create table t_table_0018_19 like t_table_0018 including reloptions; desc t_table_0018_19; create table t_table_0018_20 like t_table_0018 excluding reloptions; desc t_table_0018_20; create table t_table_0018_21 like t_table_0018 including comments; desc t_table_0018_21; create table t_table_0018_22 like t_table_0018 excluding comments; desc t_table_0018_22; --step8:create table like创建分区表; expect:建表失败,合理报错 create table t_range_1 (like t_table_0018 including all) partition by range(col01) subpartition by range(col02)( partition p1 values less than (5)( subpartition sp1 values less than ('20220401'), subpartition sp2 values less than ('20220701'), subpartition sp3 values less than ('20221001')), partition p2 values less than (10), partition p3 values less than (15) ); create table t_range_2 like t_table_0018 excluding constraints partition by range(col03) interval ('1 year') ( partition p1 values less than ('2020-01-01 00:00:01'), partition p2 values less than ('2021-01-01 00:00:01'), partition p3 values less than ('2022-01-01 00:00:01'), partition p4 values less than ('2023-01-01 00:00:01') ); create table t_list_1 like t_table_0018 including all excluding reloptions partition by list(col01) ( partition p1 values (0,2,4,6,8), partition p2 values (1,3,5,7,9), partition p3 values (10,12,14,16,18), partition p4 values (11,13,15,17,19) ); create table t_hash_1 like t_table_0018 partition by hash(col01) ( partition p1, partition p2, partition p3, partition p4, partition p5, partition p6 ); --step9:清理环境; expect:清理成功 drop table if exists t_table_0018,t_table_0018_01, t_table_0018_02, t_table_0018_03, t_table_0018_04, t_table_0018_05, t_table_0018_06, t_table_0018_07, t_table_0018_08, t_table_0018_09, t_table_0018_10, t_table_0018_11, t_table_0018_12, t_table_0018_13, t_table_0018_14, t_table_0018_15, t_table_0018_16, t_table_0018_17, t_table_0018_18, t_table_0018_19, t_table_0018_20, t_table_0018_21, t_table_0018_22 cascade; drop table if exists t_range_1, t_range_2, t_list_1, t_hash_1 cascade; 【预期输出】:  【实际输出】:  【原因分析】: 1. 这个问题的根因 2. 问题推断过程 3. 还有哪些原因可能造成类似现象 4. 该问题是否有临时规避措施 5. 问题解决方案 6. 预计修复问题时间 【日志信息】(请附上日志文件、截图、coredump信息): 【测试代码】:
<!-- #请认真填写以下信息,否则可能由于无法定位,导致issue无法解决而被取消 --> 【标题描述】: 【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】【测试版本:x.x.x】 问题描述 B库下执行 create table .... like .... ustore表结果异常 【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): 【测试环境】(单机/1主x备x级联备): 单机 【被测功能】: B库create table like 【测试类型】: 【数据库版本】(查询命令: gaussdb -V): 7.0.0 RC1 【预置条件】: 在B库下执行 【操作步骤】(请填写详细的操作步骤): --step1:创建ustore表并创建索引; expect:建表成功 set track_counts to on; set track_activities to on; drop table if exists t_table_0018; create table t_table_0018( col01 int comment '首列', col02 int not null, col03 date default '2000-01-01 00:00:01', col04 varchar(255) unique, col05 varchar(10) check(length(col05)>=5), col06 int ) with (storage_type = ustore); create index i_table_0018_01 on t_table_0018(col05); --step2:向表中插入数据; expect:数据插入成功 insert into t_table_0018 values(1,1,default,'a1','hello',15 / 3); insert into t_table_0018(col02,col04,col05) values(2,'z','he is men'); insert into t_table_0018() values(3,3,default,'a2','hello',99 + 101); insert into t_table_0018() values(4,4,'2022-10-01','a3'); insert t_table_0018() values(5,5,'2022-10-01','a4','hello',100-1); --step3:向表中插入values的默认值; expect:数据插入失败,合理报错error insert into t_table_0018() values(); --step4:向表中插入values的默认值,使用ignore参数; expect:数据插入失败,合理告警warning insert ignore into t_table_0018() values(); --step5:向表中插入数据,列名为null; expect:数据插入失败,合理报错error insert into t_table_0018(null) values (10,10,default,'a10','hello',1); insert into t_table_0018('null') values (11,11,default,'a11','hello',3); insert into t_table_0018("null") values (12,10,default,'a12','hello',5); --step6:查询表数据; expect:查询成功,查得5条数据 select * from t_table_0018; --step7:create table like创建普通表; expect:部分成功,部分合理报错 create table t_table_0018_01 like t_table_0018; desc t_table_0018_01; create table t_table_0018_02 like t_table_0018 including indexes; desc t_table_0018_02; create table t_table_0018_03 like t_table_0018 excluding indexes; desc t_table_0018_03; create table t_table_0018_04 like t_table_0018 including partition; desc t_table_0018_04; create table t_table_0018_05 like t_table_0018 excluding partition; desc t_table_0018_05; create table t_table_0018_06 like t_table_0018 including all; desc t_table_0018_06; create table t_table_0018_07 like t_table_0018 excluding all; desc t_table_0018_07; create table t_table_0018_08 like t_table_0018 including all excluding partition; desc t_table_0018_08; create table t_table_0018_09 like t_table_0018 including all excluding indexes; desc t_table_0018_09; create table t_table_0018_10 like t_table_0018 including all excluding partition excluding indexes; desc t_table_0018_10; create table t_table_0018_11 like t_table_0018 including indexes including partition; desc t_table_0018_11; create table t_table_0018_12 like t_table_0018 excluding indexes excluding partition; desc t_table_0018_12; create table t_table_0018_13 like t_table_0018 including defaults; desc t_table_0018_13; create table t_table_0018_14 like t_table_0018 excluding defaults; desc t_table_0018_14; create table t_table_0018_15 like t_table_0018 including constraints; desc t_table_0018_15; create table t_table_0018_16 like t_table_0018 excluding constraints; desc t_table_0018_16; create table t_table_0018_17 like t_table_0018 including storage; desc t_table_0018_17; create table t_table_0018_18 like t_table_0018 excluding storage; desc t_table_0018_18; create table t_table_0018_19 like t_table_0018 including reloptions; desc t_table_0018_19; create table t_table_0018_20 like t_table_0018 excluding reloptions; desc t_table_0018_20; create table t_table_0018_21 like t_table_0018 including comments; desc t_table_0018_21; create table t_table_0018_22 like t_table_0018 excluding comments; desc t_table_0018_22; --step8:create table like创建分区表; expect:建表失败,合理报错 create table t_range_1 (like t_table_0018 including all) partition by range(col01) subpartition by range(col02)( partition p1 values less than (5)( subpartition sp1 values less than ('20220401'), subpartition sp2 values less than ('20220701'), subpartition sp3 values less than ('20221001')), partition p2 values less than (10), partition p3 values less than (15) ); create table t_range_2 like t_table_0018 excluding constraints partition by range(col03) interval ('1 year') ( partition p1 values less than ('2020-01-01 00:00:01'), partition p2 values less than ('2021-01-01 00:00:01'), partition p3 values less than ('2022-01-01 00:00:01'), partition p4 values less than ('2023-01-01 00:00:01') ); create table t_list_1 like t_table_0018 including all excluding reloptions partition by list(col01) ( partition p1 values (0,2,4,6,8), partition p2 values (1,3,5,7,9), partition p3 values (10,12,14,16,18), partition p4 values (11,13,15,17,19) ); create table t_hash_1 like t_table_0018 partition by hash(col01) ( partition p1, partition p2, partition p3, partition p4, partition p5, partition p6 ); --step9:清理环境; expect:清理成功 drop table if exists t_table_0018,t_table_0018_01, t_table_0018_02, t_table_0018_03, t_table_0018_04, t_table_0018_05, t_table_0018_06, t_table_0018_07, t_table_0018_08, t_table_0018_09, t_table_0018_10, t_table_0018_11, t_table_0018_12, t_table_0018_13, t_table_0018_14, t_table_0018_15, t_table_0018_16, t_table_0018_17, t_table_0018_18, t_table_0018_19, t_table_0018_20, t_table_0018_21, t_table_0018_22 cascade; drop table if exists t_range_1, t_range_2, t_list_1, t_hash_1 cascade; 【预期输出】:  【实际输出】:  【原因分析】: 1. 这个问题的根因 2. 问题推断过程 3. 还有哪些原因可能造成类似现象 4. 该问题是否有临时规避措施 5. 问题解决方案 6. 预计修复问题时间 【日志信息】(请附上日志文件、截图、coredump信息): 【测试代码】:
评论 (
5
)
登录
后才可以发表评论
状态
已验收
待办的
已确认
已答复
已取消
挂起
修复中
已完成
待回归
测试中
已验收
负责人
未设置
lukeman
lukeman
负责人
协作者
+负责人
+协作者
douxin
ywzq1161327784
负责人
协作者
+负责人
+协作者
标签
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (
-
)
标签 (
-
)
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(5)
C++
1
https://gitee.com/opengauss/openGauss-server.git
git@gitee.com:opengauss/openGauss-server.git
opengauss
openGauss-server
openGauss-server
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册