pingcap / pingcap/tidb

An unanalyzed and empty partitioned table with no record inserted into mysql.stats_histograms's analyze might got panicked

Open
#58,182 1 comment 0 reactions 0 assignees View on GitHub
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

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.