An unanalyzed and empty partitioned table with no record inserted into mysql.stats_histograms's analyze might got panicked
Open
component/statistics
severity/moderate
sig/planner
type/bug
- 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)
A clean partitioned table without any data inserted into it.
Make sure it has no record in `mysql.stats_histograms`(It can happen when there's a lot of DDL executed in a row).
Analyze the table.
### 2. What did you expect to see? (Required)
The analyze executes successfully.
### 3. What did you see instead (Required)
Panicked.
### 4. What is your TiDB version? (Required)
master
Contributor guide
Assessment
This issue has not been assessed yet.