pingcap / pingcap/tidb

Import statistics failed without error

Open
#34,291 1 comment 0 reactions 1 assignee Claimed by @xuyifangreeneyes View on GitHub
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)
1、create table t1 (id int key) PARTITION BY range COLUMNS(id) (PARTITION P001 values less than (10000));
2、insert into t1 values(1),(2),(3);
3、analyze table t1;
4、show stats_histograms where table_name = 't1' ;
+---------+------------+----------------+-------------+----------+---------------------+----------------+------------+--------------+-------------+
| Db_name | Table_name | Partition_name | Column_name | Is_index | Update_time | Distinct_count | Null_count | Avg_col_size | Correlation |
+---------+------------+----------------+-------------+----------+---------------------+----------------+------------+--------------+-------------+
| test | t1 | global | id | 0 | 2022-04-27 18:17:11 | 3 | 0 | 8 | 0 |
| test | t1 | P001 | id | 0 | 2022-04-27 18:17:11 | 3 | 0 | 8 | 1 |
+---------+------------+----------------+-------------+----------+---------------------+----------------+------------+--------------+-------------+
5、http://${tidb-server-ip}:${tidb-server-status-port}/stats/dump/${db_name}/${table_name}
get stats info
6、drop table t1
7、create table t1 (id int key) PARTITION BY range COLUMNS(id) (PARTITION P01 values less than (10000));
8、load stats "t1"
9、show stats_histograms where table_name = 't1' ;
+---------+------------+----------------+-------------+----------+---------------------+----------------+------------+--------------+-------------+
| Db_name | Table_name | Partition_name | Column_name | Is_index | Update_time | Distinct_count | Null_count | Avg_col_size | Correlation |
+---------+------------+----------------+-------------+----------+---------------------+----------------+------------+--------------+-------------+
| test | t1 | global | id | 0 | 2022-04-27 18:26:41 | 3 | 0 | 8 | 0 |
+---------+------------+----------------+-------------+----------+---------------------+----------------+------------+--------------+-------------+
1 row in set (0.01 sec)

### 2. What did you expect to see? (Required)
Step 8 Report the error that the partition ‘P001’ cannot be found
### 3. What did you see instead (Required)
load success
### 4. What is your TiDB version? (Required)

Release Version: v6.0.0
Edition: Community
Git Commit Hash: 36a9810441ca0e496cbd22064af274b3be771081
Git Branch: HEAD
UTC Build Time: 2022-04-08 09:31:25
GoVersion: go1.18
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |

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.