查询参数设置不了

【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】
【问题描述】清晰明确描述问题
【复现路径】问题出现前后相关操作
【问题现象及影响】
SELECT id,transfer_auth_type,source_user_id,book_id,work_flow_id,work_flow_code,target_user_id,status,start_time,end_time,is_deleted,create_time,create_by,update_time,update_by FROM t_sys_authorize_cfg
WHERE (transfer_auth_type IN (?,?) AND end_time < ?)
2023-02-15 14:32:00.112 DEBUG 38712 — [scheduling-1] c.q.r.f.s.d.m.A.selectPage : ==> Parameters: BOOK(String), AUDIT(String), 2023-02-15T14:32(LocalDateTime)
上面的查询语句报错如下:

是不能插入localdate这种是吗只能是Timestamp这种吗
【附件】

请问你具体使用的oceanbase版本是多少,另外可以给出完整的复现操作以及observer的对应日志么?

3.1.4这是应用打印的日志
rates-system.log (634.6 KB)

需要oceanbase数据库目录下的 log的对应日志

observer.zip (2.7 MB)
SQL: SELECT id,transfer_auth_type,source_user_id,book_id,work_flow_id,work_flow_code,target_user_id,status,start_time,end_time,is_deleted,create_time,create_by,update_time,update_by FROM t_sys_authorize_cfg WHERE (transfer_auth_type IN (?,?) AND end_time < ?)

Cause: java.sql.SQLTransientConnectionException: (conn=1572944) Parameter at position 3 is not set

; (conn=1572944) Parameter at position 3 is not set; nested exception is java.sql.SQLTransientConnectionException: (conn=1572944) Parameter at position 3 is not set
at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:70) ~[spring-jdbc-5.2.9.RELEASE.jar:5.2.9.RELEASE]

还有这个错:
SQL: select id from t_sys_book t where t.is_deleted = false and book_tree_id in ( WITH RECURSIVE sub_book AS ( SELECT id FROM t_sys_book_gro WHERE id in (select book_tree_id from t_sys_book_gro_user_cfg where is_deleted =false and user_id in ( ? ) AND is_trade_available = ? )AND is_deleted = false UNION SELECT d.id FROM t_sys_book_gro d INNER JOIN sub_book s ON s.id = d.parent_id) SELECT * FROM sub_book b)

Cause: java.sql.SQLTransientConnectionException: (conn=1572944) recursive WITH clause must use a UNION ALL operation

; (conn=1572944) recursive WITH clause must use a UNION ALL operation; nested exception is java.sql.SQLTransientConnectionException: (conn=1572944) recursive WITH clause must use a UNION ALL operation
at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:70) ~[spring-jdbc-5.2.9.RELEASE.jar:5.2.9.RELEASE]

com.oceanbase oceanbase-client 2.2.7.2 现在用的client是这个版本,会不会影响

client 一般不会,另外第二个你新提出的报错,ob3.1.4目前只有union all,你们是从哪个数据库系统迁移过来的

这是使用grep trace-id 的方式拉出来的日志么,没在日志看到相关有用的信息

pg数据库


就是这个sql,之前是union的,报上面的错,改成union all好像不报了,但是逻辑肯定不对了吧

这是observer下面的log,不是看这个吗

是看这个。但整个observer有很多的日志,你要针对你那条报错的sql拉出来的日志我才能分析,

那要看看pg的union和union all的语义了,oceanbase是兼容oracle的recursive

日志不停的刷,根本找不到报错的时间,看着挺正常的,目前的处理是把localdatetime换成timestmps,这样就正常了

ob本身不支持union all吧,从一条sql的比较看起来两者是没有区别的对于pg