-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.severity/moderatesig/transactionSIG:TransactionSIG:Transactiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/compatibility
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
> create table t(t timestamp);
> insert into t values("2000-01-01");
> update ignore t set t=cast("2099-01-01" as date);
> select * from t;
2. What did you expect to see? (Required)
mysql> update ignore t set t=cast("2099-01-01" as date);
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 1
mysql> select * from t;
+---------------------+
| t |
+---------------------+
| 0000-00-00 00:00:00 |
+---------------------+
1 row in set (0.01 sec)
3. What did you see instead (Required)
mysql> update ignore t set t=cast("2099-01-01" as date);
ERROR 1292 (22007): Incorrect timestamp value: '2099-01-01'
mysql> select * from t;
+---------------------+
| t |
+---------------------+
| 2000-01-01 00:00:00 |
+---------------------+
1 row in set (0.01 sec)
4. What is your TiDB version? (Required)
master
Metadata
Metadata
Assignees
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.severity/moderatesig/transactionSIG:TransactionSIG:Transactiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/compatibility