Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
Database Related
>
Database Service
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
442
Star
1.5K
Fork
1.8K
openGauss
/
openGauss-server
Code
Issues
965
Pull Requests
165
Wiki
Insights
Pipelines
Service
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
【测试类型:SQL功能】【测试版本:2.0.0】cidr类型的网络地址子网掩码为32时,在函数中调用max时报错
Accepted
#I491CN
Bug
liumin
Opened this issue
2021-09-07 16:26
【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): CentOS Linux release 7.6.1810 (Core) 【测试环境】(单机/1主x备x级联备):1主2备 【被测功能】: max函数支持网络地址类型 【测试类型】: 功能测试 【数据库版本】(查询命令: gaussdb –V): gaussdb (openGauss 2.0.0 build 010fdac4) compiled at 2021-09-05 20:04:32 commit 0 last mr 【预置条件】: 【操作步骤】(请填写详细的操作步骤): step1:创建表 create table t_max_case0026_cidr(c cidr); insert into t_max_case0026_cidr values('122.5.5.3/32'),('122.5.5.9/32'); step2:创建函数 create or replace function f_max_case0026_cidr(out max_cidr cidr) returns cidr as $$ begin select max(c) into max_cidr from t_max_case0026_cidr; raise info ':%',max_cidr; return max_cidr; end; $$language plpgsql; select f_max_case0026_cidr(); 【预期输出】:step2 期望返回 122.5.5.9/32 【实际输出】: select f_max_case0026_cidr(); ERROR: invalid inet bit length: 32 CONTEXT: PL/pgSQL function f_max_case0026_cidr() line 3 at SQL statement referenced column: f_max_case0026_cidr 【原因分析】: 【日志信息】(请附上日志文件、截图、coredump信息): 【测试代码】:
【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): CentOS Linux release 7.6.1810 (Core) 【测试环境】(单机/1主x备x级联备):1主2备 【被测功能】: max函数支持网络地址类型 【测试类型】: 功能测试 【数据库版本】(查询命令: gaussdb –V): gaussdb (openGauss 2.0.0 build 010fdac4) compiled at 2021-09-05 20:04:32 commit 0 last mr 【预置条件】: 【操作步骤】(请填写详细的操作步骤): step1:创建表 create table t_max_case0026_cidr(c cidr); insert into t_max_case0026_cidr values('122.5.5.3/32'),('122.5.5.9/32'); step2:创建函数 create or replace function f_max_case0026_cidr(out max_cidr cidr) returns cidr as $$ begin select max(c) into max_cidr from t_max_case0026_cidr; raise info ':%',max_cidr; return max_cidr; end; $$language plpgsql; select f_max_case0026_cidr(); 【预期输出】:step2 期望返回 122.5.5.9/32 【实际输出】: select f_max_case0026_cidr(); ERROR: invalid inet bit length: 32 CONTEXT: PL/pgSQL function f_max_case0026_cidr() line 3 at SQL statement referenced column: f_max_case0026_cidr 【原因分析】: 【日志信息】(请附上日志文件、截图、coredump信息): 【测试代码】:
Comments (
0
)
Sign in
to comment
Status
Accepted
Backlog
Confirmed
已答复
Canceled
挂起
Fixing
Done
待回归
测试中
Accepted
Assignees
Not set
user_9601086
xi-teming
Assignee
Collaborator
+Assign
+Mention
Labels
sig/sqlengine
Not set
Projects
Unprojected
Unprojected
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (18)
Tags (29)
master
7.0.0-RC2
6.0.0
7.0.0-RC1
master_bak08271930
5.0.0
bugfix_0725
3.0.0
iud_dev
dev_board
5.1.0
kms
2.0.0
3.1.0
2.1.0
1.1.0
1.0.1
1.0.0
v6.0.2
v7.0.0-RC1
v6.0.1
v3.0.6
v6.0.0
v3.0.5B009
v5.0.3
v5.0.2
v6.0.0-RC1
v3.0.5
v5.0.1
v5.1.0
5.1.0
v5.0.0
v3.0.3
v3.1.1
v3.0.2
v3.1.0
v2.0.5
v3.0.1
v2.0.4
v2.0.3
v3.0.0
v2.1.0
v2.0.1
v2.0.0
v1.1.0
v1.0.1
v1.0.0
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(1)
C++
1
https://gitee.com/opengauss/openGauss-server.git
git@gitee.com:opengauss/openGauss-server.git
opengauss
openGauss-server
openGauss-server
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register