[MDEV-30044] The problem of the representation of zero in the MOD function Created: 2022-11-20  Updated: 2022-11-20  Resolved: 2022-11-20

Status: Closed
Project: MariaDB Server
Component/s: Data types
Affects Version/s: 10.9.4
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: 王瑞丰 Assignee: Sergei Golubchik
Resolution: Duplicate Votes: 0
Labels: None
Environment:

mariadb docker


Issue Links:
Duplicate
duplicates MDEV-6856 <negative value> MOD <fractional divi... Open

 Description   

Consider the following statements:

SELECT mod(-12,-4); – expected: 0, actual: 0
SELECT mod('-12',-4); – expected: 0, actual: -0
the result of these two test cases is different, We expect them to be the same.

database version : 10.9.4-MariaDB-1:10.9.4+maria~ubu2204


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