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

Unexpected error when CHECK a predicate that is always true. #44689

Closed
DerZc opened this issue Jun 15, 2023 · 1 comment · Fixed by #44833
Closed

Unexpected error when CHECK a predicate that is always true. #44689

DerZc opened this issue Jun 15, 2023 · 1 comment · Fixed by #44833
Assignees
Labels

Comments

@DerZc
Copy link

DerZc commented Jun 15, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

The following query triggers an error:

CREATE TABLE t0(c1 NUMERIC CHECK (true));

This is the error message:

Column check constraint 't0_chk_1' references other column.

A true predicate means no value will violate this constraint. This query can triggers this error in MySQL, and MySQL verified this is a bug.
https://bugs.mysql.com/bug.php?id=111421

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

No error.

3. What did you see instead (Required)

Column check constraint 't0_chk_1' references other column.

4. What is your TiDB version? (Required)

Release Version: v7.2.0-alpha-421-gabd9ff5ca6\nEdition: Community\nGit Commit Hash: abd9ff5ca6fe866224f243c931844f050fb4952c\nGit Branch: master\nUTC Build Time: 2023-06-14 08:57:42\nGoVersion: go1.20.3\nRace Enabled: false\nCheck Table Before Drop: false\nStore: unistore
@DerZc DerZc added the type/bug This issue is a bug. label Jun 15, 2023
@hawkingrei hawkingrei added the sig/sql-infra SIG: SQL Infra label Jun 16, 2023
@ti-chi-bot ti-chi-bot bot added may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Jun 18, 2023
@seiya-annie seiya-annie removed may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Jun 18, 2023
@CbcWestwolf
Copy link
Member

@fzzf678 PTAL

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.

5 participants