已关闭
[Bug]: D兼容库加载shark后基于binary类型列创建视图触发view.cpp断言失败 #8379
liyangx创建于  8月6日关闭于  12 天前
liyangx成员
8月6日 创建

测试类型

SQL功能

测试版本

7.0.0LTS

问题描述

D 兼容库加载 shark 插件后,基于 binary/varbinary 类型列创建视图时触发 view.cpp 断言失败,导致后端进程 abort,客户端连接断开。

操作系统和硬件信息

不限

测试环境

企业版单机

被测功能

D 兼容库下 shark binary/varbinary 类型列创建视图功能

预置条件

  1. 创建 D 兼容数据库。
  2. 加载 shark 插件。
  3. 开启 default_collation。
  4. debug/cassert 编译版本下可观察到断言失败。
  5. 当前数据库编码为 SQL_ASCII 时可稳定触发。

操作步骤

  1. 连接 D 兼容数据库,确认数据库编码。
    show server_encoding;
    如果结果不是 SQL_ASCII,则新建 SQL_ASCII 编码的 D 兼容数据库后继续验证。
  2. 确认 shark 插件已加载。
    create extension if not exists shark;
  3. 执行复现 SQL。
    复现 SQL:
drop schema if exists sys1 cascade;
create schema sys1;
set search_path to sys1;

create table students (
    name varchar(100) not null,
    grade decimal(5,2)
);

-- 必 崩溃 sql
create view student_grades as
select name, grade from students;

注:另外尝试去在 D 兼容库加载 shark 后,显式创建包含 varbinary 类型字段的表,并基于该字段执行 CREATE VIEW,触发 view.cpp 断言失败。

预期输出

CREATE TABLE 成功。
CREATE VIEW 成功。

或者在类型/排序规则不兼容时返回明确 ERROR,不应触发数据库后端 abort,不应导致连接断开。

实际输出

执行 create view 时连接断开,数据库崩溃。

日志信息

core-log可见:https://gitcode.com/liyangx/log-record-all/blob/main/issues/server/issue8379/shark_core_reparse.log

提单组织

内部开发

测试代码

likedislike
Lliyangx成员
8月6日 添加了label:bug
opengauss_bot
opengauss_bot成员
8月6日 评论:

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成员
8月6日 将 TestManager 设为负责人
opengauss_botopengauss_bot成员
8月6日 添加了label:sig/StorageEngine,sig/AI,sig/CM,sig/CloudNative,sig/SecurityTechnology,sig/SQLEngine
opengauss_bot
opengauss_bot成员
8月6日 评论:

Welcome To openGauss Community

Hey @liyangx , 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: StorageEngine, AI, CM, CloudNative, SecurityTechnology, SQLEngine ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zhangzq131, @zjh_hw .

likedislike
Lliyangx成员
8月6日 修改标题为 “[Bug]: D兼容库加载shark后基于binary类型列创建视图触发view.cpp断言失败”,原标题为“[Bug]: core”
此处折叠了7条事件消息 查看更多
Lliyangx成员
19 天前 issue状态由 待办的 改变为 已完成
liyangx成员
18 天前 评论:

20260909转测包自验无误:
image.png

likedislike
Lliyangx成员
18 天前 issue状态由 已完成 改变为 待回归
Lliyangx成员
15 天前 修改了issue 的描述
Lliyangx成员
15 天前 修改了issue 的描述
liyangx成员
15 天前 评论:

20260912转测包自验无误:
image.png

likedislike
yangl_
yangl_成员
12 天前 评论:

回归时间:2026.09.15
回归结论:通过
回归过程:
image.png
image.png

likedislike
yangl_yangl_成员
12 天前 issue状态由 待回归 改变为 已验收
yangl_yangl_成员
12 天前 关闭了 issue