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

Can not insert -1 as Type BIT #11895

Closed
SunRunAway opened this issue Aug 27, 2019 · 1 comment · Fixed by #11951 or #18697
Closed

Can not insert -1 as Type BIT #11895

SunRunAway opened this issue Aug 27, 2019 · 1 comment · Fixed by #11951 or #18697
Labels
severity/moderate type/bug The issue is confirmed as a bug.

Comments

@SunRunAway
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
drop table if exists t1;
create table t1(c1 bit(64));
insert into t1 value(-1);
  1. What did you expect to see?

Query OK, 1 row affected

  1. What did you see instead?

ERROR 1264 (22003): Out of range value for column 'c1' at row 1

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
@wjhuang2016
Copy link
Member

Please fix the test

tidb/executor/join_test.go

Lines 399 to 407 in cea80ae

/* Enable & fix this test after https://github.com/pingcap/tidb/issues/11895 is fixed.
tk.MustExec("drop table if exists t;")
tk.MustExec("drop table if exists t1;")
tk.MustExec("create table t(c1 bigint unsigned);")
tk.MustExec("create table t1(c1 bit(64));")
tk.MustExec("insert into t value(18446744073709551615);")
tk.MustExec("insert into t1 value(-1);")
result = tk.MustQuery("select * from t, t1 where t.c1 = t1.c1;")
c.Check(len(result.Rows()), Equals, 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants