Bug 33239 - RPT: "ORDER BY" clause dropped in "analyze sql: no" case when grouping is set in the report
Summary: RPT: "ORDER BY" clause dropped in "analyze sql: no" case when grouping is set...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.3.0 RC3
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Queries
  Show dependency treegraph
 
Reported: 2011-01-18 05:12 UTC by Lionel Elie Mamane
Modified: 2023-12-04 03:14 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2011-01-18 05:12:27 UTC
The data sourced command for a report is e.g.
 SELECT a, b, c FROM s.t WHERE a=0 ORDER BY d
But the command that is sent to the database (tested with MySQL) is:
 SELECT a, b, c FROM s.t WHERE a=0
Comment 1 Lionel Elie Mamane 2011-01-18 05:33:42 UTC
I mean, as far as I understand, the idea of "analyze SQL: no" is that the query
is sent to the database unchanged / untouched, so don't go removing stuff from
it, even if LibreOffice happens to succeed parsing it...
Comment 2 Gabor Jenei 2011-08-22 04:46:46 UTC
for me with version 3.5 it works on Debian 6 32bits,so problem seems to be fixed, or OS dependent.
Comment 3 Björn Michaelsen 2011-12-23 11:46:43 UTC Comment hidden (obsolete)
Comment 4 Lionel Elie Mamane 2012-07-11 13:11:44 UTC
Cannot reproduce in features/base-preview, which means:

 - nearly certainly fixed in 3.5.6
 - possibly only fixed in 3.6.0
 - my best guess is: fixed far before 3.5.6, probably already 3.5.0
Comment 5 Lionel Elie Mamane 2012-07-11 13:32:50 UTC
Confirmed in features/base-preview after all, but:

 - If the SQL command has an "ORDER BY" *and* the report does not
   have any grouping / sorting, *then* the SQL's "ORDER BY" is obeyed.

 - If the SQL command has an "ORDER BY" *and* the report *has*
   some grouping / sorting, *then* the SQL's "ORDER BY" is  dropped
   (and the report's grouping / sorting is dropped *too*, but that's bug 33240).
Comment 6 Jochen 2012-07-26 19:36:55 UTC
Why status "UNCONFIRMED"?
Comment 7 Robert Großkopf 2012-08-03 18:12:06 UTC
I have set this to "Resolved" and "Worksforme", because "Order By" is only dropped, when grouping is set in the report. This is Bug
https://bugs.freedesktop.org/show_bug.cgi?id=33240
Comment 8 Lionel Elie Mamane 2012-08-04 22:44:59 UTC
(In reply to comment #7)
> I have set this to "Resolved" and "Worksforme", because "Order By" is only
> dropped, when grouping is set in the report. This is Bug
> https://bugs.freedesktop.org/show_bug.cgi?id=33240

No, bug 33240 is about the grouping settings being ignored, not about the query sent to the database.
Comment 9 Jochen 2012-08-05 08:57:35 UTC
Hi Lionel,

is the subject-text "RPT: "ORDER BY" clause dropped in "analyze sql: no" case" still correct?
If not: what is in your opinion the correct text?
Comment 10 Jochen 2012-08-23 18:50:38 UTC
(In reply to comment #9)
> is the subject-text "RPT: "ORDER BY" clause dropped in "analyze sql: no" case"
> still correct?
> If not: what is in your opinion the correct text?

Hi Lionel,

have you time to look at this bugreport?
I want to be able to decide if status is "UNCONFIRMED", "NEEDINFO" or "NEW".
Comment 11 Jochen 2012-09-02 10:09:28 UTC
IMHO no open questions. Set status ti "NEW".
Comment 12 Alex Thurgood 2015-01-03 17:39:25 UTC Comment hidden (no-value)
Comment 13 QA Administrators 2016-01-17 20:04:43 UTC Comment hidden (obsolete)
Comment 14 QA Administrators 2017-03-06 14:29:55 UTC Comment hidden (obsolete)
Comment 15 QA Administrators 2019-12-03 13:55:14 UTC Comment hidden (obsolete)
Comment 16 QA Administrators 2021-12-03 04:22:13 UTC Comment hidden (obsolete)
Comment 17 QA Administrators 2023-12-04 03:14:41 UTC
Dear Lionel Elie Mamane,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug