pingcap / pingcap/tidb

Additional metadata to be logged when Data too Long error is thrown

Open
#53,888 0 comments 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement
I was creating a multi-valued index in TiDB `create index tags_idx_1 on users(botId, (CAST(tags AS CHAR(255) ARRAY)));` which failed due to `Data too long` error because one of the element in the tags array had more than 255 charecters, it doesn't say which record in the table failed, we could add some additional metadata like tidb's row id or the data (in this case the string) itself is problematic
It would be easier for the users to understand this and probably understand their table structure better as well as debug better
Please correct me if this is already a way to know which record is problematic
Thanks
TiDB version: `v7.5.0`

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the TiDB SQL statement shown in the issue and trace the Data too long error path. Determine how the failing row or value could be identified without exposing unsuitable data; done means the error provides actionable metadata for locating the problematic record.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.