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

Table creation with auto_increment and default expressions behaves differently from MySQL #51587

Closed
Tracked by #50936
zimulala opened this issue Mar 7, 2024 · 0 comments · Fixed by #51640
Closed
Tracked by #50936
Assignees
Labels
affects-7.1 affects-7.5 component/ddl This issue is related to DDL of TiDB. severity/moderate type/bug This issue is a bug.

Comments

@zimulala
Copy link
Contributor

zimulala commented Mar 7, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

drop table t0;
create table t0 (c int(10), c1 int auto_increment default (rand(1)));

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

ERROR 1067 (42000): Invalid default value for 'c1'

3. What did you see instead (Required)

Query OK, 0 rows affected (0.02 sec)

4. What is your TiDB version? (Required)

master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 affects-7.5 component/ddl This issue is related to DDL of TiDB. severity/moderate type/bug This issue is a bug.
Projects
None yet
2 participants