<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 - Direct SQL: Queries in Tools → SQL and macro give wrong results - direct SQL works well"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=143656">143656</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Direct SQL: Queries in Tools → SQL and macro give wrong results - direct SQL works well
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (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>robert@familiegrosskopf.de
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="https://bugs.documentfoundation.org/attachment.cgi?id=174003" name="attach_174003" title="Open the database, test the queries and do the saem with Direct → SQL">attachment 174003</a> <a href="https://bugs.documentfoundation.org/attachment.cgi?id=174003&action=edit" title="Open the database, test the queries and do the saem with Direct → SQL">[details]</a></span>
Open the database, test the queries and do the saem with Direct → SQL
Open the attached database.
There is a table with some "Name", which could be marked by *.
The following SQL-commenad should be executed:
SELECT * FROM "Person" WHERE "Name" LIKE '%*'
It has to show all "Name", which will end with an '*'.
Execute Query_GUI.
It will show all rows of the table. The GUI will set '*' to '%'.
Execute Query_direct_SQL.
It will show one row. The query is send directly to the database. This is the
expected result.
Now start Tools → SQL.
Copy the query
SELECT * FROM "Person" WHERE "Name" LIKE '%*'
Chose "Show output of "select" statements" and press "Execute" (doesn't work
with LO 7.2.0.2 - use a version before 7.2)
You get the same result as shown in Query_GUI: All rows will be shown.
Open the form.
The same query could be started from the button in the form.
A macro will be executed and the result will be shown.
Same result as in Tools → SQL and Query_GUI.
Seems only "Run SQL command directly", chosen in the Query-editor, will be
executed directly. Tools → SQL will be interpreted at some point and set the
code to wrong code. Same behavior with Macros.
Expected behavior: Query_direct_SQL should show the same content as Tools → SQL
and queries in a macro.
This bug has been detected in LO 7.1.5.1, but it will be the same in older
versions. Tested with OpenSUSE 15.2
Hint: You cant test with LO 7.2.0.2, because the "Execute" button in Tools →
SQL won't be activated.</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>