已关闭
[Bug]: 事务开始后,current_date()为常量 #8377
王正元创建于  8月6日关闭于  8月24日
王正元
王正元成员
8月6日 创建

测试类型

SQL功能

测试版本

7.0.0LTS

问题描述

事务开始或prepare的p语句创建后,current_date()获取的值为常量

操作系统和硬件信息

不涉及

测试环境

企业版单机

被测功能

B库函数

预置条件

创建openGauss B库

操作步骤

step1. 开启事务,查询current_date()
step2. 一天后再次查询current_date()
step3. 提交事务,后再次查询current_date()

预期输出

step1. 显示当天时间
step2. 显示第二天的时间
step3. 显示第二天的时间

实际输出

step1. 显示当天时间
step2. 显示事务开启的时间
step3. 显示第二天的时间

日志信息

1555cb35f3154dd5e81fdadf93365516.png

提单组织

内部开发

测试代码

likedislike
王正元王正元成员
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 @wangzhengyuan1 , 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
王正元王正元成员
8月6日 issue优先级由 无优先级 改变为 次要
此处折叠了5条事件消息 查看更多
Lliyangx成员
8月17日 issue状态由 待办的 改变为 已完成
liyangx成员
8月19日 评论:

20260819转测包自验:
B库:
image.png
image.png

非B库验证:
image.png

likedislike
Lliyangx成员
8月19日 issue状态由 已完成 改变为 待回归
陈博达
陈博达成员
8月24日 评论:

【回归版本】openGauss 7.0.0-RC3 build a2d43dcd
【回归日期】20260824
【回归人员】陈博达
【回归结论】通过

测试结果
事务内跨天后 current_date 返回真实当前日期 (第二天),而非事务开始日期; 提交后及 prepare+execute 亦应返回真实当前日期。
image.png

likedislike
liuzhen001liuzhen001成员
8月24日 issue状态由 待回归 改变为 已验收
liuzhen001liuzhen001成员
8月24日 关闭了 issue
liuzhen001liuzhen001成员
8月24日 issue状态由 已验收 改变为 已完成
liuzhen001liuzhen001成员
8月24日 重新打开了 issue
liuzhen001liuzhen001成员
8月24日 issue状态由 已完成 改变为 已验收
liuzhen001liuzhen001成员
8月24日 关闭了 issue