Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Not a Bug
-
Affects Version/s: 10.0.3
-
Fix Version/s: 10.0.5
-
Component/s: None
-
Labels:None
Description
MariaDB [test]> SELECT 0 - seq AS seq FROM seq_1_to_1; ERROR 1690 (22003): BIGINT UNSIGNED value is out of range in '(0 - `test`.`seq_1 _to_1`.`seq`)'
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Yes, this always happens when you do an unsigned subtraction and end up with a negative result, like in
SELECT 0 - CAST(1 AS UNSIGNED);
if you need that to work, either cast an unsigned integer to signed or set sql_mode to NO_UNSIGNED_SUBTRACTION.