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

Get error data too long when use values for bit(1). #15310

Closed
wshwsh12 opened this issue Mar 12, 2020 · 0 comments · Fixed by #15350
Closed

Get error data too long when use values for bit(1). #15310

wshwsh12 opened this issue Mar 12, 2020 · 0 comments · Fixed by #15350
Assignees
Labels

Comments

@wshwsh12
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
create table t(id int primary key auto_increment, a bit(1));
insert into t values(1,1);
insert into t values(1,1) on duplicate key update id = values(id),a = values(a);
  1. What did you expect to see?

No error.

  1. What did you see instead?
tidb> create table t(id int primary key auto_increment, a bit(1));
Query OK, 0 rows affected (0.01 sec)

tidb> insert into t values(1,1);
Query OK, 1 row affected (0.00 sec)

tidb> insert into t values(1,1) on duplicate key update id = values(id),a = values(a);
ERROR 1406 (22001): Data Too Long, field len 1
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
    master and release-3.0.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants