Open fubinzh opened 1 month ago
The first URL is ALTER TABLE statement which I think is unrelated. The second URL is TableOptionAutoIdCache, but this issue is AUTO_INCREMENT (TableOptionAutoIncrement) which is some lines above it.
So is it as simple as testing the condition and current db?
Yes I guess adding a testing here https://github.com/pingcap/tidb/blob/fd6d5c1cd0f6de9b2f000b4ba997cc79f79ae26f/pkg/ddl/create_table.go#L789-L790 is enough. But you need to find the correct way to do the check. Maybe refer to ConvertIntToInt
function. And the lowerBound
/upperBound
should be decided by column type.
So can I take this up?
/assign adi-kmt
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
mysql> insert into t1 values (); ERROR 1690 (22003): constant 2147483648 overflows int