pingcap / pingcap/tidb

Fix the improper use of system variables in internal SQL

Open
#65,968 2 comments 0 reactions 1 assignee Claimed by @fzzf678 View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.