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


Welcome To openGauss Community
Hey @wuchenlong , 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 ,
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: @CityYard, @libiao2024, @lijieac, @theothersideofsea, @wang_bowen, @weithu, @xiong_xjun, @yuanyazhi, @zhangzq131 .



-- 建测试表(场景 18/19 需要)
DROP TABLE IF EXISTS test1 CASCADE;
CREATE TABLE test1 (id INT PRIMARY KEY, name VARCHAR(100));
INSERT INTO test1 VALUES (1, 'init');
COMMIT;
-- 确认历史记录开启
SET HISTORY ON;
-- 先执行几条历史语句,让历史队列有内容(场景 15/16/18 需要"上一条历史")
SELECT 1 FROM DUAL;
SELECT 2 FROM DUAL;
BEGIN NULL; END;
/
原问题输入后按UP会重绘导致出现重复块,现已修复,目前会整块调出上块历史,而不是在当前行多出上句历史;
SQL> Begin
2 null;
3 end;
4 <按 Up 键>

回退后行号正常
SQL> /*
2 test comment
3 <按 Backspace>

第三行按UP召回上行历史是正常行为,没有进行修改。
SQL> insert into test1(name,id) values ('
2 test;
3 '
4 ,2);
第 3 行 <按 Up 键>

超长块按Up后Down重绘正常
将附件SQL黏贴执行,按UP向上翻阅多次,再按DOWN回到最初



回归版本:oGRAC Release 7.0.0-RC3 18ce0a2 build 2026-08-26 09:48:01
回归环境:oGRAC 双节点(20.20.20.104 / 20.20.20.106),db=ONLINE,节点 20.20.20.104 执行
结论:通过(多行 PL/SQL 块、块注释 Backspace、字符串跨行 Up、超长 SQL Up/Down 重绘均正常)
回归步骤(ogsql / as sysdba,Linux 真实 TTY,手工)
1) Begin / null; / end; 边输边回车,再 Up;Ctrl+L 清屏
2) /* 换行 test comment 再空行 Backspace
3) insert ... values (' 换行后再 Up
4) 超长 SQL Up 再 Down
实际输出
手工验证:
- Up 不叠两份块;Ctrl+L 不丢掉未提交输入
- Backspace 后行号连续,不再跳到 29
- 字符串跨行时 Up 不把历史 SQL 召进引号
- 超长 SQL Up/Down 后屏幕与缓冲一致、无残影


测试类型
工具功能
测试版本
7.0.0-LTS
操作系统和硬件信息
openEuler 20.03 aarch64
测试环境
oGRAC双节点
被测功能
ogsql Readline 多行编辑 — Up/Down/Backspace 与历史召回、重绘
预置条件
oGRAC ONLINE;TTY
ogsql / as sysdba;HISTORY ON。需求文档描述 ogsql_rollback_multiline_input、pendingHistory 多行快照。操作步骤
预期输出
实际输出
日志信息
用户手工 #15/#16/#18/#19。多行渲染帧 pendingHistory 与字符串态机疑似缺陷。
提单组织
测试团队