<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - base sql query parameter with negative value fails"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=130672">130672</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>base sql query parameter with negative value fails
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>6.3.4.2 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Base
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>cwaynedavis@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>