[MDEV-15924] Wrong field type for CAST(temporal_column AS [UN]SIGNED) Created: 2018-04-18 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Affects Version/s: | 10.2, 10.3 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Epic Link: | Data type cleanups | ||||||||||||
| Description |
|
Looks excessive. TIME can have only 7 digits in the integer part: hhhmmss. |
| Comments |
| Comment by Alexander Barkov [ 2018-04-18 ] | |||||||||||||
|
A similar problem is repeatable when casting from signed int to signed int:
Notice, the data type for the column c1 was erroneously detected as bigint(11). We're casting from SIGNED INT to SIGNED INT, so nothing should change. The expected data type should be int, not bigint. Notice, COALESCE() does preserve int. | |||||||||||||
| Comment by Alexander Barkov [ 2018-04-18 ] | |||||||||||||
|
A similar problem is repeatable when casting from unsigned int to unsigned int:
|