Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dump table stats error on wrong enum values #21098

Closed
pcqz opened this issue Nov 17, 2020 · 5 comments
Closed

Dump table stats error on wrong enum values #21098

pcqz opened this issue Nov 17, 2020 · 5 comments
Labels
challenge-program help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@pcqz
Copy link

pcqz commented Nov 17, 2020

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
drop table if exists t;
create table t (id serial, field ENUM('Y','N') DEFAULT 'N');
insert into t values(1,'A');
analyze table t;

curl ${tidb-server-ip}:${tidb-server-status-port}/stats/dump/test/t

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

Dump stats successfully with no error.

3. What did you see instead (Required)

convert to MySQL enum failed: item is not in enum [Y N]: [types:1265]Data truncated for column '%s' at row %d

4. What is your TiDB version? (Required)

release-4.0

SIG slack channel

#sig-exec

Score

300

Mentor

@pcqz pcqz added the type/bug The issue is confirmed as a bug. label Nov 17, 2020
@pingcap pingcap deleted a comment from ti-srebot Nov 19, 2020
@jebter jebter added the sig/sql-infra SIG: SQL Infra label Nov 20, 2020
@wjhuang2016 wjhuang2016 added sig/planner SIG: Planner and removed sig/sql-infra SIG: SQL Infra labels Nov 30, 2020
@wjhuang2016 wjhuang2016 added sig/execution SIG execution and removed sig/planner SIG: Planner labels Nov 30, 2020
@lzmhhh123 lzmhhh123 added challenge-program help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Dec 4, 2020
@XuHuaiyu XuHuaiyu added sig/planner SIG: Planner and removed sig/execution SIG execution labels Dec 10, 2020
@clark1013
Copy link
Contributor

/assign

@clark1013 clark1013 removed their assignment Feb 20, 2021
@rickyyx
Copy link

rickyyx commented Mar 24, 2021

Is it fixed already or still a bug?

I am seeing almost identical behaviour on current master 4b90ef4 with MySQL. (Just that analyze doesn't produce a table on TiDB, but does on MySQL, which seems not to be the concern of this issue).

@jianzhiyao
Copy link
Contributor

jianzhiyao commented May 6, 2021

Can't reproduce in TiDB 5.0.
PTAL @ichn-hu

use test
> OK
> 时间: 0.001s


drop table if exists t
> OK
> 时间: 0.012s


create table t (id serial, a ENUM('Y','N') DEFAULT 'N')
> OK
> 时间: 0.007s


insert into t values(1,'A')
> 1265 - Data truncated for column 'a' at row 1
> 时间: 0.002s

@yudongusa
Copy link

@pcqz it seems the problem was already fixed, would you please verify and close if no further issues?

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
challenge-program help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

10 participants