[MDEV-30633] DATETIME to TIMESTAMP conversion to return maximum timestamp on overflow Created: 2023-02-10 Updated: 2024-01-24 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Data types, Temporal Types |
| Fix Version/s: | 11.5 |
| Type: | New Feature | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | timestamp | ||
| Issue Links: |
|
||||||||
| Description |
|
Datetime to timestamp conversion currently converts huge datetime values to '0000-00-00 00:00:00':
This is not how other data types work. Numeric data types convert huge values to the maximum value of the target data type:
So does TIME:
Let's change DATETIME->TIMESTAMP conversion to convert huge DATETIME values to the maximum possible TIMESTAMP value with UNIX_TIMESTAMP 0x7FFFFFFF. |
| Comments |
| Comment by Alexander Barkov [ 2023-02-13 ] |
|
Hello Sergei, Please review a patch: |