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]: EXPLAIN ANALYZE FORCE EXECUTE fails on prepared plan snapshot binding #29509
EXPLAIN ANALYZE FORCE EXECUTE fails with an internal reused-plan snapshot error on current main (a36da7f72d), including for a prepared statement with no parameters. Ordinary EXPLAIN FORCE EXECUTE and direct EXPLAIN ANALYZE SELECT both work. This blocks measurement of the actual prepared execution plan while investigating pushdown regressions.
Reproduction
CREATETABLEt (id BIGINTPRIMARY KEY);
INSERT INTO t VALUES (1);
PREPARE p FROM'SELECT COUNT(*) FROM t WHERE id=1';
EXPLAIN FORCE EXECUTE p; -- succeeds
EXPLAIN ANALYZE FORCE EXECUTE p; -- ERROR 20101 (HY000): internal error: reused plan generation is missing its snapshot binding
EXPLAIN ANALYZE SELECTCOUNT(*) FROM t WHERE id=1; -- succeeds
The error occurs at pkg/frontend/computation_wrapper.go in reused plan generation. Please verify snapshot ownership when EXPLAIN ANALYZE executes a prepared plan, and cover normal, parameterized, cached/reused and FORCE paths.
Activity
fix: preserve prepared ROUND and TRUNCATE value domains (#29508)
Ariznawlll commentedon Oct 2, 2026
测试版本
maind50a2d475a406829f67127fef7b2ad4abc1c1d3dmo-service,独立数据目录;MySQL 文本协议与 server-side PREPARE原问题验证
按 issue 原始语义在上述 commit 重新执行并重复 3 次。EXPLAIN FORCE EXECUTE 与 EXPLAIN ANALYZE FORCE EXECUTE 均成功,并显示实际 filter。
Happy Path 覆盖
覆盖普通 EXPLAIN、FORCE、ANALYZE FORCE 和参数重绑。
Unhappy Path 覆盖
覆盖 NULL、类型变化及执行后再次 explain;无 stale plan/panic。
白盒验证
关联修复 #29508 已进入当前
main。同时将本 issue 的可公开观察契约固化为独立回归,避免只依赖实现细节或共享测试间接判断。回归测试
suites/14_issue_regression/t/issue_recent_sql_semantics.test714/714条语句通过。测试证据
d50a2d475a406829f67127fef7b2ad4abc1c1d3d14_issue_regression中观察到的旧 GOROOT/历史 golden/并发锁冲突属于既有无关失败,以上新增用例单独重跑均稳定通过。测试结论
测试通过。