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

should report error when divide 0 occurs when adding a generated index with default sql mode #50053

Closed
lcwangchao opened this issue Jan 4, 2024 · 1 comment · Fixed by #50057
Assignees

Comments

@lcwangchao
Copy link
Collaborator

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

> create table t1(a int);
> insert into t1 values(0);
> alter table t1 add index i((100/a));

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

In mysql8.0

mysql> alter table t1 add index i((100/a));
ERROR 1365 (22012): Division by 0

3. What did you see instead (Required)

mysql> alter table t1 add index i((100/a));
Query OK, 0 rows affected (0.76 sec)

4. What is your TiDB version? (Required)

master

@lcwangchao lcwangchao added type/bug This issue is a bug. component/ddl This issue is related to DDL of TiDB. severity/major labels Jan 4, 2024
@lcwangchao lcwangchao changed the title should report error when divid 0 occurs when adding a generated index with default sql mode should report error when divide 0 occurs when adding a generated index with default sql mode Jan 4, 2024
ti-chi-bot bot pushed a commit that referenced this issue Jan 4, 2024
AilinKid pushed a commit to AilinKid/tidb that referenced this issue Jan 17, 2024
@D3Hunter
Copy link
Contributor

as discussed( @lcwangchao @tangenta) , we won't pick this to previous version until it's required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants