No desensitization for Savepoint statements caused a lot of sql digests
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
When we use Savepoint and release savepoint statements, then we can find many sql digests with different savepoint id.
Different savepoint id reported as different sql digest.
Such as, executing the following sql which will caused 4 sql digests generated.
savepoint s111111_x111;
release savepoint s111111_x111;
savepoint s111112_x111;
release savepoint s111112_x111;
### 2. What did you expect to see? (Required)
2 sql digest should be generated using desensitization.
savepoint ?;
release savepoint ?;
### 3. What did you see instead (Required)
4 sql digests generated in top sqls and sql statements from dashboard and other diagnosis tools like these.
### 4. What is your TiDB version? (Required)
v7.5.0
Contributor guide
Research direction
Start by reproducing the four Savepoint and RELEASE SAVEPOINT statements on TiDB v7.5.0, then trace the SQL digest desensitization entry point used by Top SQL and diagnosis tools. Done means statements with different savepoint identifiers produce one digest per statement form, matching the expected normalized SQL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100