[MDEV-17559] signed integer overflow in Item_func_minus Created: 2018-10-27  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Data types
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Eugene Kosov (Inactive) Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Both queries fails in two places with -ftrapv:

select -9223372036854775808 - 1;
select 1-convert(1, unsigned int);

I think computations should be performed in ulonglong instead of longlong.


Generated at Thu Feb 08 08:37:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.