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
[Bug]: INET_NTOA wraps out-of-range integers into IPv4 addresses #28215
PR #28800 fixes INET_NTOA numeric conversion by preserving input signedness/type and validating the converted value before narrowing, preventing negative and oversized values from wrapping into a valid address. It adds integer, DECIMAL, FLOAT/DOUBLE, vector, prepared, NULL, and boundary coverage. The PR is open; local UT/BVT were not run because the isolated worktree lacks provenance-validated CGo artifacts, and exact-head CI is still running.
Activity
Ariznawlll commentedon Sep 8, 2026
Latest
main(f72ca9efbeb3a7c673701e4a135cc6670c33cfde) confirms both parts of the conversion issue:[0, 4294967295]are masked to their low 32 bits instead of returningNULL.Examples repeated three times:
Boundary controls
0,1,16909060, and4294967295agree with MySQL.Ariznawlll commentedon Sep 12, 2026
在当前
main6875e4203519de1ed98b842c1cbc8c57f11dc326上,三轮双 CN、BIGINT 列、View、CTAS 和 server-side PreparedStatement 覆盖仍复现低 32 位截断。在列值 CTAS 路径中,MatrixOne 将这些截断后的地址写入结果表;MySQL 对相同列表达式报
ERROR 1411 Incorrect integer value,同样不会写入一个经截断的地址。0、4294967295、NULL控制值一致。XuPeng-SH commentedon Sep 12, 2026
PR #28800 fixes INET_NTOA numeric conversion by preserving input signedness/type and validating the converted value before narrowing, preventing negative and oversized values from wrapping into a valid address. It adds integer, DECIMAL, FLOAT/DOUBLE, vector, prepared, NULL, and boundary coverage. The PR is open; local UT/BVT were not run because the isolated worktree lacks provenance-validated CGo artifacts, and exact-head CI is still running.
fix: correct IPv4 and IPv6 function semantics (#28800)
Ariznawlll commentedon Sep 15, 2026
测试版本
main:0c3a04f390adaf6281fd592a49778ea5b1155e67原问题验证
验证
INET_NTOA对负数、超过 UINT32 的值返回 NULL,不再回绕为 IPv4 地址。Happy Path 覆盖
覆盖 0、
2130706433、4294967295三个合法边界/常见 IPv4 整数。Unhappy Path 覆盖
覆盖 -1、
4294967296,确认均返回 NULL。白盒验证
不适用:公开 SQL 输入边界已直接覆盖。
回归测试
已加入 MOTR:
issue_28214_28217_ipv4_semantics,见 motr#176。测试证据
新 MOTR 用例连续运行 3 轮成功,合法边界与越界拒绝均符合预期。
测试结论
测试通过。
fix: correct IPv4 and IPv6 function semantics (matrixorigin#28800)
fix: correct IPv4 and IPv6 function semantics (matrixorigin#28800)
fix: correct IPv4 and IPv6 function semantics (matrixorigin#28800)