402 Star 1.4K Fork 1.5K

GVPopenGauss / openGauss-server

 / 详情

xc_for_update用例报错不能识别的nodetype 942

已完成
缺陷
创建于  
2023-04-25 19:48

【标题描述】:
【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】【测试版本:2.0.0】 问题描述

【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):
[ycy@6a364f1c48c1 datanode1]$ cat /etc/system-release
CentOS Linux release 7.9.2009 (Core)

[ycy@6a364f1c48c1 datanode1]$ uname -a
Linux 6a364f1c48c1 5.14.0-202.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Nov 28 12:10:13 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

【测试环境】(单机/1主x备x级联备):
单机

【被测功能】:
流水线用例集合 xc_for_update

【测试类型】:
功能测试

【数据库版本】(查询命令: gaussdb -V):
openGauss=# select version();
version


(openGauss 5.1.0 build 90ad02ea) compiled at 2023-04-25 11:37:55 commit 0 last mr debug on x86_64-unknown-linux-gnu, co
mpiled by g++ (GCC) 7.3.0, 64-bit

【预置条件】:

【操作步骤】(请填写详细的操作步骤):
openGauss=# CREATE TABLE t1(val int, val2 int);
TE TABLE t2(val int, val2 int);
INSERT INTO t1 VALUES(1,11),(2,11);
INSERT INTO t2 VALUES(3,11),(4,11);CREATE TABLE
openGauss=# CREATE TABLE t2(val int, val2 int);
CREATE TABLE
openGauss=# INSERT INTO t1 VALUES(1,11),(2,11);
INSERT 0 2
openGauss=# INSERT INTO t2 VALUES(3,11),(4,11);
INSERT 0 2
openGauss=#
openGauss=#
openGauss=#
openGauss=# WITH q1 AS (SELECT * FROM t1 ORDER BY 1 FOR UPDATE) SELECT * FROM q1,t2 ORDER BY 1 FOR UPDATE;
WARNING: unrecognized node type: 942
WARNING: unrecognized node type: 942
ERROR: unexpected command tag "???"
openGauss=# \q

【预期输出】:
WITH q1 AS (SELECT * from t1 order by 1 FOR UPDATE) SELECT * FROM q1,t2 order by 1 FOR UPDATE;
ERROR: SELECT FOR UPDATE/SHARE cannot be applied to a WITH query

【实际输出】:
openGauss=# WITH q1 AS (SELECT * FROM t1 ORDER BY 1 FOR UPDATE) SELECT * FROM q1,t2 ORDER BY 1 FOR UPDATE;
WARNING: unrecognized node type: 942
WARNING: unrecognized node type: 942
ERROR: unexpected command tag "???"

【原因分析】:

  1. 这个问题的根因
    问题的根据是parse的类型出错了,导致找不到对应的nodetype

  2. 问题推断过程

  3. 还有哪些原因可能造成类似现象

  4. 该问题是否有临时规避措施

  5. 问题解决方案

  6. 预计修复问题时间

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

【测试代码】:

openGauss=#
openGauss=# CREATE TABLE t1(val int, val2 int);
TE TABLE t2(val int, val2 int);
INSERT INTO t1 VALUES(1,11),(2,11);
INSERT INTO t2 VALUES(3,11),(4,11);CREATE TABLE
openGauss=# CREATE TABLE t2(val int, val2 int);
CREATE TABLE
openGauss=# INSERT INTO t1 VALUES(1,11),(2,11);
INSERT 0 2
openGauss=# INSERT INTO t2 VALUES(3,11),(4,11);
INSERT 0 2
openGauss=#
openGauss=#
openGauss=# WITH q1 AS (SELECT * FROM t1 ORDER BY 1 FOR UPDATE) SELECT * FROM q1,t2 ORDER BY 1 FOR UPDATE;
ERROR: SELECT FOR UPDATE/SHARE cannot be applied to a WITH query
openGauss=#

评论 (5)

东山 创建了缺陷
东山 任务状态待办的 修改为已确认
展开全部操作日志

Hey @东山, 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 @东山, 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 .

东山 修改了描述
东山 修改了描述
yansong_lee 负责人设置为pengjiong
yansong_lee 优先级设置为次要
CREATE TABLE t1(val int, val2 int);
CREATE TABLE t2(val int, val2 int);
INSERT INTO t1 VALUES(1,11),(2,11);
INSERT INTO t2 VALUES(3,11),(4,11);
 WITH q1 AS (SELECT * FROM t1 ORDER BY 1 FOR UPDATE) SELECT * FROM q1,t2 ORDER BY 1 FOR UPDATE;

问题在本地已经解决,等合入
请把单子指给我,谢谢

问题在本地已经解决,等合入
请把单子指给我,谢谢

@东山 非社区成员指定不了。你解吧。

pengjiong 任务状态已确认 修改为已完成
pengjiong 负责人pengjiong 修改为未设置

登录 后才可以发表评论

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

搜索帮助