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 not return error when updating timestamp to an overflowed value with 'ignore' #50308

Closed
lcwangchao opened this issue Jan 11, 2024 · 2 comments · Fixed by #54878
Closed
Assignees
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. severity/moderate sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug. type/compatibility

Comments

@lcwangchao
Copy link
Collaborator

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

@kennedy8312
Copy link

Seeing the same issue on v5.4.0 as well.

@ti-chi-bot ti-chi-bot added the affects-8.1 This bug affects the 8.1.x(LTS) versions. label Apr 9, 2024
@jebter jebter added the impact/inconsistency incorrect/inconsistency/inconsistent label Jun 3, 2024
@cfzjywxk cfzjywxk assigned you06 and crazycs520 and unassigned crazycs520 and you06 Jul 24, 2024
@cfzjywxk
Copy link
Contributor

@jebter
This is not an inconsistency issue, but a MySQL compatible issue, the severity could be lowered.

@cfzjywxk cfzjywxk added type/compatibility severity/moderate affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. and removed impact/inconsistency incorrect/inconsistency/inconsistent severity/major may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 labels Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. severity/moderate sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug. type/compatibility
Projects
None yet
8 participants