You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
create table t(
y year NOT NULL DEFAULT '2155'
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
insert into t values();
ALTER TABLE t ADD COLUMN y1 year as (y + 2);
ALTER TABLE t ADD INDEX idx_y(y1);
What did you expect to see?
mysql> create table t(
-> y year NOT NULL DEFAULT '2155'
-> )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
Query OK, 0 rows affected (0.02 sec)
mysql> insert into t values();
Query OK, 1 row affected (0.00 sec)
mysql> ALTER TABLE t ADD COLUMN y1 year as (y + 2);
Query OK, 0 rows affected (0.02 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE t ADD INDEX idx_y(y1);
ERROR 1264 (22003): Out of range value for column 'y1' at row 1
What did you see instead?
Executing this statement of ALTER TABLE t ADD INDEX idx_y(y1); will get stuck.
What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
Release Version: v3.0.0-beta-18-g7648317da
Git Commit Hash: 7648317
Git Branch: master
The text was updated successfully, but these errors were encountered:
Bug Report
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
What did you see instead?
Executing this statement of
ALTER TABLE t ADD INDEX idx_y(y1);
will get stuck.What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?Release Version: v3.0.0-beta-18-g7648317da
Git Commit Hash: 7648317
Git Branch: master
The text was updated successfully, but these errors were encountered: