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
当生成列使用 DATE_ADD 或 DATE_SUB,prepared UPDATE 修改其依赖列时,MatrixOne 会把已经规范化为三个参数的内部表达式重新送入只接受两个 SQL 参数的绑定逻辑,执行阶段因此返回 date_add/date_sub function need two args, bad value 3。相同 UPDATE 直接执行可以正确重算生成列,MySQL prepared UPDATE 也可以执行。
createdatabasegc_ps_repro;
use gc_ps_repro;
createtablet (
id intprimary key,
dt datetime(6),
g datetime(6) generated always as
(date_add(dt, interval 1 microsecond)) stored
);
insert into t(id, dt) values (1, '2024-01-01 01:02:03.123456');
-- 直接 UPDATE 能正确重算 gupdate t set dt='2025-02-03 04:05:06.222222'where id=1;
select id, dt, g, microsecond(g) from t;
prepare s from'update t set dt=? where id=?';
set @dt='2026-03-04 05:06:07.333333', @id=1;
execute s using @dt, @id;
MatrixOne 行为
ERROR 20203: invalid argument date_add/date_sub function need two args, bad value 3
g datetime(6) generated always as
(date_sub(dt, interval 1 microsecond)) stored
g datetime(6) generated always as
(date_add(dt, interval 1 microsecond)) virtual
Closing as consolidated tracking under #28119. This report has the same observed internal DATE_ADD/DATE_SUB arity error at the prepared-expression rebinding boundary; its STORED/VIRTUAL generated-column UPDATE repro is preserved as a regression case on the canonical issue.
Merged PR #28932 states that this behavior was already present on its upstream base. No claim is made here that the generated-column case still reproduces on current main; this closure is administrative consolidation, not a fix or a current-main validation result.
Activity
XuPeng-SH commentedon Oct 23, 2026
Closing as consolidated tracking under #28119. This report has the same observed internal
DATE_ADD/DATE_SUBarity error at the prepared-expression rebinding boundary; its STORED/VIRTUAL generated-column UPDATE repro is preserved as a regression case on the canonical issue.Merged PR #28932 states that this behavior was already present on its upstream base. No claim is made here that the generated-column case still reproduces on current main; this closure is administrative consolidation, not a fix or a current-main validation result.