[MDEV-14910] Unexpected "BIGINT UNSIGNED value is out of range" for minus Created: 2018-01-10 Updated: 2024-01-03 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Affects Version/s: | 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Epic Link: | Data type cleanups | ||||||||||||||||||||||||
| Description |
|
This script returns an error unexpectedly:
It tries to create a BIGIN UNSIGNED column as a result:
The choice beween BIGINT and UNSIGNED BIGINT is controlled by the NO_UNSIGNED_SUBTRACTION flag in sql_mode. |
| Comments |
| Comment by Alexander Barkov [ 2018-01-10 ] | |||||||
|
The same problem is repeatable with TIMESTAMP columns, which are treated as UNSIGNED:
| |||||||
| Comment by Tadas BalaiĊĦis [ 2024-01-03 ] | |||||||
|
The error reproduced in 11.1.2-MariaDB. Very undesired behavior. Workaround is to use cast function:
Badly that
still produces 1690 error. |