[Libreoffice-bugs] [Bug 143656] New: Direct SQL: Queries in Tools → SQL and macro give wrong results - direct SQL works well

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Aug 1 07:07:05 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=143656

            Bug ID: 143656
           Summary: Direct SQL: Queries in Tools → SQL and macro give
                    wrong results - direct SQL works well
           Product: LibreOffice
           Version: unspecified
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Base
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: robert at familiegrosskopf.de

Created attachment 174003
  --> https://bugs.documentfoundation.org/attachment.cgi?id=174003&action=edit
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210801/ea3827a4/attachment.htm>


More information about the Libreoffice-bugs mailing list