已关闭
[Bug]: set不存在的schema信息,B库desc table_name出现core #1617
ywzq1161327784创建于  7月16日关闭于  8月12日
ywzq1161327784
ywzq1161327784成员
7月16日 创建

测试类型

SQL功能

测试版本

7.0.0LTS

问题描述

set不存在的schema信息,B库desc table_name出现core

操作系统和硬件信息

不限

测试环境

企业版单机

被测功能

desc功能

预置条件

无

操作步骤

创建B库,执行下面的sql

set current_schema to 'test_ansi_quotes';  --不存在的一个schema
CREATE TABLE test_quotes (a text); --建表报错,schema不存在
desc test_quotes --发生core,指定不存在的表

create table test(id int);
set current_schema to 'test_ansi_quotes';
desc test;  --这里指定存在的表信息,也core

预期输出

合理报错

实际输出

image.png
image.png
core堆栈

(gdb) 
#0  strlen () at ../sysdeps/aarch64/strlen.S:94
#1  0x000000000118ad30 in namehashfast (datum=0) at catcache.cpp:153
#2  0x000000000118b610 in CatalogCacheComputeHashValue (cc_hashfunc=0xfffc1d42a138, nkeys=1, 
    arguments=0xfffc2c9d1c60) at catcache.cpp:356
#3  0x000000000121fb98 in LocalSysTupCache::SearchTupleInternal (this=0xfffc1d42a0b8, nkeys=1, v1=0, v2=0, v3=0, 
    v4=0, level=13) at knl_localsystupcache.cpp:483
#4  0x00000000011d3678 in LocalSysTupCache::SearchLocalCatCTuple (this=0xfffc1d42a0b8, nkeys=1, v1=0, v2=0, v3=0, 
    v4=0, level=13) at ../../../../../src/include/utils/knl_localsystupcache.h:133
#5  0x00000000011d3b40 in LocalSysTabCache::SearchTupleN (this=0xfffc20352090, cache_id=54, nkeys=1, v1=0, v2=0, 
    v3=0, v4=0, level=13) at ../../../../../src/include/utils/knl_localsystabcache.h:271
#6  0x00000000011d38a8 in LocalSysTabCache::SearchTuple (this=0xfffc20352090, cache_id=54, v1=0, v2=0, v3=0, v4=0, 
    level=13) at ../../../../../src/include/utils/knl_localsystabcache.h:216
#7  0x00000000011d0a28 in SearchSysCache (cacheId=54, key1=0, key2=0, key3=0, key4=0, level=13) at syscache.cpp:977
#8  0x00000000011d1764 in GetSysCacheOid (cacheId=54, key1=0, key2=0, key3=0, key4=0) at syscache.cpp:1128
#9  0x0000000000a57ca4 in get_namespace_oid (nspname=0x0, missing_ok=true) at namespace.cpp:3759
#10 0x0000fffd29f74088 in checkTableExistence (classrel=0xfffc14515568) at parse_describe.cpp:692
#11 0x0000fffd29e82468 in base_yyparse (yyscanner=0xfffc145150b0) at gram.y:30119
#12 0x0000fffd29ed3594 in raw_parser (str=0xfffc14514060 "desc test_quotes_2;", 
    query_string_locationlist=0xfffc2c9de768) at parser.cpp:128
#13 0x0000000001beee58 in pg_parse_query (query_string=0xfffc14514060 "desc test_quotes_2;", 
    query_string_locationlist=0xfffc2c9de768, parser_hook=0xfffd29ed3534 <raw_parser(char const*, List**)>)
    at postgres.cpp:1309
#14 0x0000000001bf293c in exec_simple_query (query_string=0xfffc14514060 "desc test_quotes_2;", 
    messageType=QUERY_MESSAGE, msg=0xfffc2c9de9f8) at postgres.cpp:2833
#15 0x0000000001c05514 in ProcessCommandUpperQ (input_message=0xfffc2c9de9f8, 
    send_ready_for_query=@0xfffc2c9de968: false, query_started=@0xfffc2c9de969: true) at postgres.cpp:10108
#16 0x0000000001c04af8 in PostgresMain (argc=1, argv=0xfffc203578b8, dbname=0x0, username=0x0) at postgres.cpp:9870
#17 0x0000000001b117b4 in BackendRun (port=0xfffc2c9def18) at postmaster.cpp:10283
#18 0x0000000001b27828 in GaussDbThreadMain<(knl_thread_role)2> (arg=0xfffd2d4c6478) at postmaster.cpp:15143
#19 0x0000000001b21658 in InternalThreadFunc (args=0xfffd2d4c6478) at postmaster.cpp:15863
#20 0x00000000029ce674 in ThreadStarterFunc (arg=0xfffd2d4c6468) at gs_thread.cpp:383
#21 0x0000fffd3de2878c in start_thread (arg=0xfffd3da3ff40) at pthread_create.c:486
#22 0x0000fffd3dd751bc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:80
(gdb) 

日志信息

详见实际输出

提单组织

内部开发

测试代码

likedislike
ywzq1161327784ywzq1161327784成员
7月16日 添加了label:bug
opengauss_bot
opengauss_bot成员
7月16日 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
7月16日 将 TestManager 设为负责人
opengauss_botopengauss_bot成员
7月16日 添加了label:sig/Plugin
opengauss_bot
opengauss_bot成员
7月16日 评论:

Welcome To openGauss Community

Hey @ywzq1161327784 , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: Plugin ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @ywzq1161327784 ,
and any of the committers: @dreamalloc, @huyinghao, @libiao2024, @wangfeihuo, @wmy_ld, @wuyuechuan, @xiong_xjun, @zhangxubo, @zhaojunv3z810 .

likedislike
ywzq1161327784ywzq1161327784成员
7月16日 修改了issue 的描述
ywzq1161327784ywzq1161327784成员
7月16日 修改了issue 的描述
ywzq1161327784ywzq1161327784成员
7月16日 issue优先级由 无优先级 改变为 次要
ywzq1161327784ywzq1161327784成员
7月16日 关联了看板:openGauss 7.0.0-LTS
ywzq1161327784ywzq1161327784成员
7月16日 移除了负责人 TestManager
opengauss_bot
opengauss_bot成员
7月16日 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
7月16日 将 TestManager 设为负责人
此处折叠了6条事件消息 查看更多
ywzq1161327784ywzq1161327784成员
7月29日 重新打开了 issue
shijuzheng1997
shijuzheng1997成员
8月5日 评论:

20260805开发自验

图片.png

likedislike
shijuzheng1997shijuzheng1997成员
8月5日 issue状态由 已完成 改变为 待回归
jiangyan
jiangyan成员
8月12日 评论:

日期:2026年8月12日
回归版本:openGauss7.0.0LTS B017
回归结论:通过

image.png

likedislike
jiangyanjiangyan成员
8月12日 issue状态由 待回归 改变为 已验收
jiangyanjiangyan成员
8月12日 关闭了 issue