Please answer these questions before submitting your issue. Thanks!
> 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
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