You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Compatibility]: ADDDATE and SUBDATE reject prepared value and interval parameters #28135
在 MatrixOne main 99ed717b769e261b842c2f17345bd65865fc1470,ADDDATE() 和 SUBDATE() 的 prepared statement 参数无法执行:
PREPARE p FROM'SELECT ADDDATE(?, INTERVAL 1 DAY)';
SET @d ='2024-02-29';
EXECUTE p USING @d;
PREPARE p FROM'SELECT ADDDATE(?, INTERVAL ? DAY)';
SET @d ='2024-02-29'; SET @n =1;
EXECUTE p USING @d, @n;
PREPARE p FROM'SELECT SUBDATE(?, INTERVAL 1 DAY)';
SET @d ='2024-02-29';
EXECUTE p USING @d;
三种形式在 prepare/execute 阶段均返回 invalid argument date_add/date_sub function need two args, bad value 3。相同值改为字面量可执行;WEEK(?, ?)、YEARWEEK(?, ?)、CONVERT_TZ(?, ?, ?) 的 prepared 参数可执行。
Closing as duplicate tracking of #28119. ADDDATE and SUBDATE reach the same prepared DATE_ADD/DATE_SUB arity failure already tracked there. The canonical issue now includes the alias cases in its regression matrix; this is administrative consolidation only, not a fix. The original reproduction remains here for reference.
Activity
XuPeng-SH commentedon Oct 23, 2026
Closing as duplicate tracking of #28119.
ADDDATEandSUBDATEreach the same preparedDATE_ADD/DATE_SUBarity failure already tracked there. The canonical issue now includes the alias cases in its regression matrix; this is administrative consolidation only, not a fix. The original reproduction remains here for reference.