Fix the improper use of system variables in internal SQL
Open
severity/moderate
sig/sql-infra
type/bug
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
TiDB’s internal SQL reuse internal sessions (the sys session pool). If session-scoped system variables (sysvars) are modified on a reusable session but are not reliably restored on the same session, those changes may leak across tasks/requests into the next reuse, **causing subtle behavioral drift and hard-to-debug issues**. Use this issue as a single umbrella tracker to consolidate and track the related PRs.
Contributor guide
Assessment
This issue has not been assessed yet.