[MDEV-30991] The representation of 0 in multiplication, pow function Created: 2023-04-03  Updated: 2023-09-28  Resolved: 2023-09-28

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

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

maria docker


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

 Description   

SELECT '0'*-4; – expected: 0, actual: -0
SELECT pow('0'*-4,3); – expected: 0, actual: -0

When we use the multiplication, pow function to calculate, we find that if there is a negative number type string, the result will be inconsistent with the expectation


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