看错误栈和这个问题比较匹配,TiDB5.0.0 UNION語法導致ERROR 1105 (HY000): runtime error: index out of range [-1] 目前只有 PR ,还没有修复好像。