Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Gitee 2025 OpenSource,We need your vote!
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
443
Star
1.5K
Fork
1.8K
openGauss
/
openGauss-server
Code
Issues
976
Pull Requests
166
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.
query_dop > 1 时修改外部表导致崩溃
Accepted
#I78GJR
Bug
xiyanziran
Opened this issue
2023-05-26 09:40
<!-- #请根据issue的类型在标题左侧下拉框中选择对应的选项(需求、缺陷或咨询等)--> <!-- #请按照如下模板填写详细的信息以供分析和定位 --> 【标题描述】: 【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】【测试版本:2.0.0】 问题描述 【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): 【测试环境】(单机/1主x备x级联备): 【被测功能】: FDW 【测试类型】: 【数据库版本】(查询命令: gaussdb -V): 【预置条件】: 【操作步骤】(请填写详细的操作步骤): 1.创建扩展 create extension oracle_fdw; 2.创建FDW Server用于识别外部数据源 create server ora_fdw_server foreign data wrapper oracle_fdw options(dbserver '172.16.10.14:1521/orcl'); 3.新建用户并授权 create user use_ora password 'Bigdata@123'; grant usage on foreign server ora_fdw_server to use_ora; 4.创建USER MAPPING用于映射Oracle数据库用户 create user mapping for use_ora server ora_fdw_server options(user 'system',password 'root'); 5.在oracle创建表 create table system.emp_fdw(empno int primary key,ename varchar(30)); insert into emp_fdw values(1,'foo'); insert into emp_fdw values(2,'bar'); 6.在openGauss创建外部表,切换到用户use_ora: create foreign table emp_fdw_ora(empno int options(key 'true'),ename varchar(30)) server ora_fdw_server options(schema 'SYSTEM',table 'EMP_FDW'); 7.删除外部表数据 delete from emp_fdw_ora where empno=2; 【预期输出】: 删除数据成功 【实际输出】: 宕机 【原因分析】: 1. 这个问题的根因 在 getDistSessionKey 中只有ENABLE_MOT时检查节点类型是否为 DefElem,否则直接当作 DefElem 访问,遇到Const时崩溃。 2. 问题推断过程 3. 还有哪些原因可能造成类似现象 4. 该问题是否有临时规避措施 5. 问题解决方案 不管开没开 mot,都对节点类型进行检查。 6. 预计修复问题时间 【日志信息】(请附上日志文件、截图、coredump信息): 【测试代码】:
<!-- #请根据issue的类型在标题左侧下拉框中选择对应的选项(需求、缺陷或咨询等)--> <!-- #请按照如下模板填写详细的信息以供分析和定位 --> 【标题描述】: 【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】【测试版本:2.0.0】 问题描述 【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): 【测试环境】(单机/1主x备x级联备): 【被测功能】: FDW 【测试类型】: 【数据库版本】(查询命令: gaussdb -V): 【预置条件】: 【操作步骤】(请填写详细的操作步骤): 1.创建扩展 create extension oracle_fdw; 2.创建FDW Server用于识别外部数据源 create server ora_fdw_server foreign data wrapper oracle_fdw options(dbserver '172.16.10.14:1521/orcl'); 3.新建用户并授权 create user use_ora password 'Bigdata@123'; grant usage on foreign server ora_fdw_server to use_ora; 4.创建USER MAPPING用于映射Oracle数据库用户 create user mapping for use_ora server ora_fdw_server options(user 'system',password 'root'); 5.在oracle创建表 create table system.emp_fdw(empno int primary key,ename varchar(30)); insert into emp_fdw values(1,'foo'); insert into emp_fdw values(2,'bar'); 6.在openGauss创建外部表,切换到用户use_ora: create foreign table emp_fdw_ora(empno int options(key 'true'),ename varchar(30)) server ora_fdw_server options(schema 'SYSTEM',table 'EMP_FDW'); 7.删除外部表数据 delete from emp_fdw_ora where empno=2; 【预期输出】: 删除数据成功 【实际输出】: 宕机 【原因分析】: 1. 这个问题的根因 在 getDistSessionKey 中只有ENABLE_MOT时检查节点类型是否为 DefElem,否则直接当作 DefElem 访问,遇到Const时崩溃。 2. 问题推断过程 3. 还有哪些原因可能造成类似现象 4. 该问题是否有临时规避措施 5. 问题解决方案 不管开没开 mot,都对节点类型进行检查。 6. 预计修复问题时间 【日志信息】(请附上日志文件、截图、coredump信息): 【测试代码】:
Comments (
17
)
Sign in
to comment
Status
Accepted
Backlog
Confirmed
已答复
Canceled
挂起
Fixing
Done
待回归
测试中
Accepted
Assignees
Not set
薛蒙恩
xue_meng_en
Assignee
Collaborator
+Assign
+Mention
周斌
justbk
Assignee
Collaborator
+Assign
+Mention
裴琳倩
peilinqian
Assignee
Collaborator
+Assign
+Mention
xiyanziran
vastdata-xyzr
Assignee
Collaborator
+Assign
+Mention
Labels
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 (20)
Tags (30)
master
datavec_poc
6.0.0
5.0.0
tp_poc
7.0.0-RC2
7.0.0-RC1
master_bak08271930
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
v7.0.0-RC2
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)
参与者(3)
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