Bug 107954 - SQL-statement shows also columns of "OrderBY"-section in Tools > SQL
Summary: SQL-statement shows also columns of "OrderBY"-section in Tools > SQL
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-19 14:31 UTC by Robert Großkopf
Modified: 2023-05-26 09:31 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Open the database and try the SQL-code in Tools > SQL. (15.59 KB, application/vnd.oasis.opendocument.database)
2017-05-19 14:31 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2017-05-19 14:31:57 UTC
Created attachment 133402 [details]
Open the database and try the SQL-code in Tools > SQL.

Open the attached database.
Start Tools > SQL
Mark 'Show output of "select"-statements
Execute the following code:
SELECT "Nachname", "Vorname" FROM "Teilnehmer" ORDER BY "Nachname", "Vorname" ASC

It will show 
<Nachname>,<Vorname>,<Nachname>,<Vorname>,

Now start
SELECT "Nachname", "Vorname" FROM "Teilnehmer" ORDER BY "Nachname" ASC
It will show 
<Nachname>,<Vorname>,<Nachname>,

Every field, which is included in ORDER BY, will be repeated at the end of the row.

This bug appears in LO 4.0.0.3, where it has been introduced to show the output, up to LO 5.4.0.0 alpha1. Tested with OpenSUSE 42.1 64bit rpm Linux.
Comment 1 Robert Großkopf 2017-05-21 14:49:11 UTC
Seems to be a special problem with internal HSQLDB. The bug won't appear, for example, with external MariaDB, connected through JDBC: http://de.openoffice.info/viewtopic.php?f=8&t=68206#p269810
Comment 2 Alex Thurgood 2017-05-22 08:25:14 UTC
Confirming with

Version: 5.4.0.0.alpha1+
Build ID: 5ac9c1ce61c516800cef503662d80d92394fb3f9
CPU threads: 2; OS: Mac OS X 10.12.4; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group

and supplied test file.
Comment 3 Julien Nabet 2017-05-23 21:17:04 UTC
If it happens only with hsqldb it seems it could be not our bug but hsqldb one.
Now, the version we use is EOL, so we're stuck between obsolete hsqldb and Firebird still in experimental state. There's a 3.0.2 version which we could be use but there are pbs with MacOs.
Sorry, I can't help here.
Comment 4 QA Administrators 2018-05-24 02:46:26 UTC Comment hidden (obsolete)
Comment 5 Robert Großkopf 2018-05-24 06:05:06 UTC
Have tested this again with 
Version: 6.1.0.0.alpha1+
Build-ID: 6e7e4d9f02f286ccb817cb2c1f54a951dcebffad
CPU-Threads: 4; BS: Linux 4.4; UI-Render: Standard; VCL: kde4; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-05-21_01:55:12
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group

The same bug with the internal HSQLDB.

But then I migrated the database to internal Firebird - had an SQL-Error but the needed data were there. With internal Firebird the values aren't repeated.

... so if we wait a little bit longer the problem is solved by switching from internal HSQLDB to internal Firebird.
Comment 6 QA Administrators 2019-05-25 02:56:36 UTC Comment hidden (obsolete)
Comment 7 Robert Großkopf 2019-05-25 06:20:34 UTC
Bug is still there for internal HSQLDB with LO 6.2.4.2 on OpenSUSE 15, 64bit rpm Linux.
Bug won't appear with internal Firebird database.
Comment 8 QA Administrators 2021-05-25 05:27:17 UTC Comment hidden (obsolete)
Comment 9 Robert Großkopf 2021-05-25 05:39:46 UTC
Nothing changed here with LO 7.1.3.2 on OpenSUSE 15.2 64bit rpm Linux.
Comment 10 QA Administrators 2023-05-26 03:17:51 UTC Comment hidden (obsolete)
Comment 11 Robert Großkopf 2023-05-26 09:31:05 UTC
Bug is still the same with internal HSQLDB on LO 7.5.3.2.