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
Decoded-length mismatch, for example VECF32_FROM_BASE64('AA=='):
ERROR 20101 (HY000): internal error: vec_from_base64: decoded length 1 is not a multiple of 4 bytes
The same result was reproduced in three consecutive executions. The connection remains usable after each error.
Control cases:
Valid round trips for F32/F64 and valid raw payloads for F16/BF16/INT8/UINT8 all decode correctly.
FROM_BASE64('!!!') returns SQL NULL and does not expose an internal error.
5. Expected behavior
Malformed function arguments should be reported as an invalid-input/data error (or the function's documented nullable result), not as an internal MatrixOne failure.
6. Code location
pkg/sql/plan/function/func_unary.go currently constructs internal errors directly for both user-input branches:
n, err:=base64.StdEncoding.Decode(buf, data)
iferr!=nil {
returnmoerr.NewInternalErrorNoCtx("vec_from_base64: invalid base64 input")
}
ifn%elemSize!=0 {
returnmoerr.NewInternalErrorNoCtxf(
"vec_from_base64: decoded length %d is not a multiple of %d bytes", n, elemSize)
}
These branches should use a user-input error class rather than NewInternalErrorNoCtx*.
Activity
fix: classify invalid vector Base64 input as user error (#29363)
Ariznawlll commentedon Sep 27, 2026
测试版本
main5be6cd90b501da225be591ffffe6000bf01f515e原问题验证
在上述最新 main 上按 issue 原始复现步骤执行,并独立重复 3 次;3/3 均满足修复后的预期。当前 main 已包含修复提交
7cf7dbb6200d2cefbe826152a7c76a9ae1b2a177。Happy Path 覆盖
Unhappy Path 覆盖
白盒验证
确认修复提交
7cf7dbb6200d2cefbe826152a7c76a9ae1b2a177是当前 main 的祖先,并核对对应 MatrixOne BVT/实现路径;本次另以公开 SQL 协议执行黑盒验收。回归测试
已加入 MOTR PR #204 的
issue_29323_29325_29327_29328_29329_29330_29331_sql_contracts.test,MOTR 提交2b4462f2;本地基线比对连续 3 次通过。测试证据
5be6cd90b501da225be591ffffe6000bf01f515e测试结论
测试通过。