pingcap / pingcap/tidb

`[types:1406]Data Too Long, field len 17` when dump stats

Open
#54,884 0 comments 0 reactions 0 assignees View on GitHub
component/statistics impact/func-failure may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 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)

Use the [prepare_sql.txt](https://github.com/pingcap/tidb/files/5902349/prepare_sql.txt) mentioned in https://github.com/pingcap/tidb/issues/22642

And analyze the table t1 and t3 by `analyze table tbl_1 full columns; analyze table tbl_3 full columns;`

Then use the curl to dump their stats like
```
curl -s http://127.0.0.1:10080/stats/dump/wout_cluster_index/tbl_3 -o wout_cluster_index_tbl_3.json
```

### 2. What did you expect to see? (Required)

The stats json is dumped correctly.

### 3. What did you see instead (Required)

error thrown `[types:1406]Data Too Long, field len 17`

### 4. What is your TiDB version? (Required)

current 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.