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]: IS_IPV4_COMPAT misclassifies the IPv6 loopback address #28217
The reserved IPv6 loopback address ::1 is not an IPv4-compatible address and must return 0. Valid values such as ::192.168.1.1 must continue to return 1.
isIPv4Compat currently accepts any 16-byte value with twelve zero prefix bytes except all-zero ::; it does not exclude the reserved loopback value ::1.
PR #28800 tightens IPv4-compatible classification to exclude the reserved :: and ::1 values while retaining the valid payload boundary beginning at ::2. Boundary and SQL regression coverage is included. 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 12, 2026
在当前
main6875e4203519de1ed98b842c1cbc8c57f11dc326上补充覆盖了常量、列值、PreparedStatement 和两 CN,::1都被IS_IPV4_COMPAT判为1,三轮结果一致:对等的 16 字节二进制值
UNHEX('00000000000000000000000000000001')也得到 MatrixOne1、MySQL0。::192.0.2.1仍为1,普通 IPv4、IPv4-mapped IPv6 和普通 IPv6 为0,因此边界集中在保留的 loopback 值::1。XuPeng-SH commentedon Sep 12, 2026
PR #28800 tightens IPv4-compatible classification to exclude the reserved :: and ::1 values while retaining the valid payload boundary beginning at ::2. Boundary and SQL regression coverage is included. 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原问题验证
IS_IPV4_COMPAT('::1')当前返回 0,IPv6 loopback 不再被误判为 IPv4-compatible。Happy Path 覆盖
覆盖 IPv4-compatible
::192.168.1.1与 IPv4-mapped::ffff:192.168.1.1的正确分类。Unhappy Path 覆盖
覆盖 loopback
::1,断言其 incompatible/mapped 判断均为 0。白盒验证
不适用:公开 SQL 函数结果已直接覆盖。
回归测试
已加入 MOTR:
issue_28214_28217_ipv4_semantics,见 motr#176。测试证据
新 MOTR 用例连续运行 3 轮成功;IPv4-compatible、mapped 和 loopback 分类均符合预期。
测试结论
测试通过。
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)