-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Wrong default value for integer type #34881
Labels
affects-6.1
This bug affects the 6.1.x(LTS) versions.
component/parser
report/customer
Customers have encountered this bug.
severity/moderate
type/bug
The issue is confirmed as a bug.
Comments
/component parser |
mainly due to https://github.com/pingcap/tidb/blob/master/parser/model/model.go#L242, we set the |
/assign |
12 tasks
add another case: test> create table td ( a int default 1.9, b int);
Query OK, 0 rows affected
Time: 0.079s
test> show create table td;
+-------+--------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------+
| td | CREATE TABLE `td` (\n `a` int(11) DEFAULT '2',\n `b` int(11) DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set
Time: 0.018s |
ti-chi-bot
pushed a commit
that referenced
this issue
Jun 7, 2022
12 tasks
ti-chi-bot
pushed a commit
that referenced
this issue
Jan 10, 2023
/found customer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-6.1
This bug affects the 6.1.x(LTS) versions.
component/parser
report/customer
Customers have encountered this bug.
severity/moderate
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Wrong default value for integer type cause error in tiflash: pingcap/tiflash#3157
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: