Bug 162761 - LO base, firebird negative decimal number changes from round number to fractional greater by 1 digit (steps in comment 2)
Summary: LO base, firebird negative decimal number changes from round number to fracti...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:25.2.0 target:24.8.2 target:24...
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2024-09-03 09:37 UTC by malt25
Modified: 2024-09-13 12:18 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
shows bug (8.00 KB, image/png)
2024-09-03 09:39 UTC, malt25
Details

Note You need to log in before you can comment on or make changes to this bug.
Description malt25 2024-09-03 09:37:58 UTC
Description:
In Base Firebird entering after entering a number "-2" it is changed in the table to "-1,9999"

Steps to Reproduce:
1.table with decimal numbers
2.enter round negative number
3.

Actual Results:
incorrect number stored

Expected Results:
correct number stored


Reproducible: Always


User Profile Reset: Yes

Additional Info:
work around seems to be entering the number for e.g. 4 digits as "-2,00001" stored as "-2,0000"

in my view a  severe bug

Version: 24.8.0.3 (X86_64) / LibreOffice Community
Build ID: 0bdf1299c94fe897b119f97f3c613e9dca6be583
CPU threads: 6; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded
Comment 1 malt25 2024-09-03 09:39:19 UTC
Created attachment 196199 [details]
shows bug
Comment 2 Buovjaga 2024-09-03 11:25:29 UTC
1. Create Firebird embedded db
2. Create table in design view
3. Add a field with Decimal type
4. In the field properties, input Decimal places: 4
5. Click Format Field and add as Format code: 0,0000
6. Save table and confirm primary key
7. Close editing and open table for input and add -2 into the decimal field

This needs to be tested from scratch every time.

I bibisected this with linux-64-25.2 to a245fd604c11f4bdbd1fdc4dd52e2a7f3880d85b
tdf#156530: fix OPreparedStatement::setString
Comment 3 Mike Kaganski 2024-09-03 12:11:22 UTC
https://gerrit.libreoffice.org/c/core/+/172800
Comment 4 Buovjaga 2024-09-03 12:29:12 UTC
(In reply to Mike Kaganski from comment #3)
> https://gerrit.libreoffice.org/c/core/+/172800

I confirm this fixes the issue.
Comment 5 Commit Notification 2024-09-03 17:02:10 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/58458c6706a2cba6939043f2310c676407233a06

tdf#162761: fix rounding

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2024-09-04 08:50:15 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/765a690ac76a7d75d247aa4c18439bfaa4e1f5f4

tdf#162761: fix rounding

It will be available in 24.8.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 malt25 2024-09-04 09:16:32 UTC
tested it with Win-x86_64@tb78-pollux-TDF_wix 	2024-09-04 05:46:13 	
ok

thanks to all involved to fix this bug so fast

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 677750f3f3d21c40e37cc4296673c931a0cb3779
CPU threads: 6; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded
Comment 8 Commit Notification 2024-09-05 09:12:14 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-8-1":

https://git.libreoffice.org/core/commit/229d76c1c955b797042bc6192a0faf6020b0413a

tdf#162761: fix rounding

It will be available in 24.8.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 malt25 2024-09-07 09:51:45 UTC
Thanks again!

It helps that the bug fix will already be available in 24.8.1.
Comment 10 malt25 2024-09-13 11:14:25 UTC
tested with Version: 24.8.1.2 (X86_64)
ok bug fixed

Thanks to all!


Version: 24.8.1.2 (X86_64) / LibreOffice Community
Build ID: 87fa9aec1a63e70835390b81c40bb8993f1d4ff6
CPU threads: 6; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded