Statementsummary v2 support for TIDB_STATEMENTS_STATS
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
On cloud, stmtv2 is enabled to collect stmt log, i.e. `tidb_stmt_summary_enable_persistent=true`. But if user access workload repository tables, errors will be thrown. Since culmulated stats are not adapted to v2, there is also no column factory.
```
mysql> select DIGEST_TEXT,MEM from information_schema.TIDB_STATEMENTS_STATS;
ERROR 1105 (HY000): should never happen, should register new column MEM into columnValueFactoryMap
mysql>
```
Contributor guide
Research direction
Start by tracing the TIDB_STATEMENTS_STATS implementation and its columnValueFactoryMap, then reproduce the stated query with stmtv2 enabled. Done means workload repository table access no longer raises the missing-column-factory error and the requested statistics columns are supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100