pingcap / pingcap/tidb

mvcc: [types:1406]Data Too Long, field len 12, data len 26%

Open
#54,865 1 comment 0 reactions 1 assignee Claimed by @zyguan View on GitHub
type/question
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)

```
> mysql -h127.0.0.1 -uroot -P4000
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4253024264
Server version: 8.0.11-TiDB-v8.2.0-alpha-10-gcfbabfa TiDB Server (Apache License 2.0) Community Edition, MySQL 8.0 compatible

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database db;
Query OK, 0 rows affected (0.17 sec)

mysql> use db;
Database changed
mysql> create table tb(a binary(12) not null, b int(11) not null, primary key(a,b));
Query OK, 0 rows affected (0.18 sec)

mysql> insert into tb values(0xAAAAAAAAAAAAAAAAAAAAAAAA,0);
Query OK, 1 row affected (0.01 sec)

mysql> exit
Bye
> curl http://127.0.0.1:10080/mvcc/key/db/tb\?a\=0xAAAAAAAAAAAAAAAAAAAAAAAA\&b\=0\;
[types:1406]Data Too Long, field len 12, data len 26%
```

### 2. What did you expect to see? (Required)
get mvcc for the key
### 3. What did you see instead (Required)
```
[types:1406]Data Too Long, field len 12, data len 26%

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

nightly

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.