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]: COM_SET_OPTION returns OK for malformed or unsupported option values #25743
Activity
Ariznawlll commentedon Jul 15, 2026
main 分支复核
origin/main@e538e203ad47ebf0506a424fe93aed61290c4061daviszhen commentedon Sep 21, 2026
#25756 (https://github.com/matrixorigin/matrixone/issues/25756)、#25744
(https://github.com/matrixorigin/matrixone/issues/25744)、#25743
(#25743) 均已由提交 e2c5dc0 / PR #25750
(e2c5dc0) 修复:
daviszhen commentedon Sep 21, 2026
本地 Docker 实测复核(2026-09-21):使用从当时最新
matrixorigin/main@df41cc24fc88fefab35151b494faa928c55eacb8构建的mo-service,直连 CN 的 MySQL 协议端口发送原始报文;已核对容器运行进程与构建产物的 SHA-256 一致。对 COM_SET_OPTION 发送空 payload、1 字节 payload,以及完整但不支持的值 2、65535:4/4 均收到 MySQL ERR 20101(短包为
invalid cmd_set_option data length,不支持值为invalid cmd_set_option data)。对有效值 0、1 的对照测试均收到 OK;测试后的新连接与 COM_PING 仍正常。结论:此 issue 描述的非法值误回 OK 问题在上述 main 提交上已无法复现。e2c5dc0 / PR #25750 将
handleSetOption的错误响应改为直接返回。Ariznawlll commentedon Sep 22, 2026
测试版本
main3727c5c5436ca136d7b0312f75bc223a11692a85原问题验证
COM_SET_OPTION 对合法 option 返回 OK,对畸形 payload 或不支持的 option 返回 ERR,不再把非法请求当作成功处理。
Happy Path 覆盖
覆盖合法 multi-statements 开关及响应,并在每个请求后以 COM_PING 验证连接可继续使用。
Unhappy Path 覆盖
覆盖空 payload、单字节、超长 payload、未知 option 值等;单轮 18 个合法及畸形组合的 OK/ERR 均符合协议契约。
白盒验证
测试通过原始 MySQL handshake 直接构造 wire packet,不经过客户端驱动预校验,可直接命中服务端 COM_SET_OPTION payload 边界。
回归测试
新增
script/14_issue_regression/issue_25743_25744_25756_protocol_bounds.go及同名.sh入口,已提交至 motr#199。测试证据
协议场景连续执行 3 轮;本次新增 7 个 case 共执行 21 次,结果为
21/21通过。14_issue_regression整套执行时该场景也通过。MOTR 当前未为该分支上报远端 checks。测试结论
测试通过。