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]: prepared TIME arithmetic rejects numeric parameters #28963
CREATETABLEt1(t TIME(3));
INSERT INTO t1 VALUES (0.001), (34.5);
PREPARE s1 FROM'SELECT t * ? FROM t1';
SET @p =10;
EXECUTE s1;
The prepared expression fails during binding with:
invalid argument operator *, bad value [TIME TEXT]
The equivalent ordinary SQL expression SELECT t * 10 FROM t1 succeeds and returns the expected fractional values.
Scope
This is separate from #28953's historical decimal-literal normalization regression and from the regression-coverage update in #28957. The current base's prepared parameter inference/coercion path treats the parameter as TEXT and does not resolve it against the TIME operand for arithmetic. Determine the intended prepared/runtime type contract before changing the binder or arithmetic resolver, then add ordinary and prepared regression coverage.
Activity
fix: support prepared TIME numeric arithmetic (#28963)
fix: support prepared TIME numeric arithmetic (#28963)
fix: support prepared TIME numeric arithmetic (#28963)
fix: support prepared TIME numeric arithmetic (#28963)
fix: support prepared TIME numeric arithmetic (#28963)
fix: support prepared TIME numeric arithmetic (#28963)
fix: support prepared TIME numeric arithmetic (#28963)
fix: support prepared TIME numeric arithmetic (#28963)
fix: support prepared TIME numeric arithmetic (#28963)
fix: support prepared TIME numeric arithmetic (#29036)
Ariznawlll commentedon Sep 20, 2026
测试版本
maind8ddce92b1c5c172111b50aefe6b6b200b2589cbe66cdea393a65974284b7463b5240407110abc57(fix: support prepared TIME numeric arithmetic #29036)原问题验证
在 MySQL 协议 prepared-statement 路径验证
TIME与数值算术。TIME(0)及TIME(6)参数在有符号整数、DECIMAL、浮点参数下均返回正确结果;同一 prepared statement 更换参数类型后结果正确,连续执行 3 次通过。覆盖范围
PREPARE/EXECUTE和二进制协议 prepared statement。TIME(0)与TIME(6)。边界与异常路径
自动化回归
issue_28963_prepared_time_arithmetic.test。33/33成功;MySQL 协议 Go 集成测试也通过。测试结论
测试通过。