https://bugs.documentfoundation.org/show_bug.cgi?id=130672
Bug ID: 130672
Summary: base sql query parameter with negative value fails
Product: LibreOffice
Version: 6.3.4.2 release
Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Base
Assignee: libreoffice-bugs@lists.freedesktop.org
Reporter: cwayneda...@gmail.com
Description:
Simple example:
SELECT * FROM "MediaInfo" WHERE "aid" = :P1
The "aid" column is integer and has some negative integers in it. When I run
the query and enter a positive integer it works but finds no records if I enter
a negative. It does work when I replace :P1 with either '-1030' or just -1030.
Sliderule gave two workarounds:
SELECT * FROM "MediaInfo" WHERE "aid" = :P1*1
or SELECT * FROM "MediaInfo" WHERE "aid" IN ( :P1 )
He says it's an issue with Base OpenOffice / LibreOffice database parser.
Steps to Reproduce:
1. Create table1 with "ID", "AID" columns, both integer. Create data rows,
with negative numbers for "aid", ex:
ID AID
123 -1030
124 235
666 -9999
2. Create query SELECT * FROM "table1" WHERE "aid" = :P1
3. Run query, enter -1030 for prompt.
Actual Results:
No records found.
Expected Results:
123, -1030
Reproducible: Always
User Profile Reset: No
Additional Info:
Version: 6.3.4.2 (x64)
Build ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win;
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs