Bug 64117 - EDITING: Query Wizard produces sql error in conditions (losing quotes)
Summary: EDITING: Query Wizard produces sql error in conditions (losing quotes)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.5.0 RC1
Hardware: Other All
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: BSA target:4.2.0 target:4.1.1 target:...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-05-01 15:26 UTC by Colin Jubb
Modified: 2013-08-08 08:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
screen shot of sql error (161.45 KB, image/jpeg)
2013-05-01 15:26 UTC, Colin Jubb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Jubb 2013-05-01 15:26:53 UTC
Created attachment 78725 [details]
screen shot of sql error

NOTE this has been broken since Libre office started. Why on earth has it not been fixed yet It is a pretty basic and important part of Base. I have seen many reports of this error for Libre office AND Open office.


Problem description: For example


Single table with only 10 or so fields

Steps to reproduce:
1. Use wizard to create query
2. Select table
3. Add three fields First name, last name , tax payer (text, text, logical)
4. Sort by Last name
5. Match all of the following
6. Tax payer, Is equal to, TRUE
7. Detailed query
8. No change to aliases
9. Display query ( accept all defaults)
10.Finish 


Current behavior:

SQL error box (attached)

Expected behavior:

Produce correct query



              
Operating System: Windows 7
Version: 4.0.2.2 release
Comment 1 Joel Madero 2013-05-01 17:35:23 UTC
Updating version as you've stated it was around since it started

@Colin - version field is the earliest version that we can confirm the problem. In this case you've stated that it was inherited by OOo when the branch happened a couple years ago.
Comment 2 Robert Großkopf 2013-05-02 15:13:24 UTC
I have tested this with LO 3.3.4 OpenSuSE 32bit rpm. 
Created a table, created the descripted fields "first name", "last name" , "tax payer" (varchar, varchar, boolean). 
Created a query with the query-wizard.
Query works. 
This is the produced query of LO 3.3.4:
SELECT "taxtest"."first name" AS "first name", "taxtest"."last name" AS "last name", "taxtest"."tax payer" AS "tax payer" FROM "taxtest" "taxtest" WHERE ( "taxtest"."tax payer" = 1 )
Comment 3 Robert Großkopf 2013-05-02 15:31:19 UTC
Have tested it with some other versions now. All LO 3.4.* work, also 3.5.0rc1 and 3.5.0.rc2. With 3.5.0 itself the wizard wont start on my system. 
At least there is then available LO 3.5.7.1 and LO 4.0.3.1. This two versions will produce the wrong code as described in this bug.
I will set the Version to 3.5.0 - could be someone will find the first version with this bug.
This is a regression, not a bug of LO since the beginning of LO.
Comment 4 Joel Madero 2013-05-02 15:34:10 UTC
Thanks Robert, great triage work here.

Have you considered jumping into the QA IRC channel? Maybe you already have and I just didn't know but the invite is out there
Comment 5 Robert Großkopf 2013-05-03 16:01:10 UTC
Have tested a little bit more:
With LO 3.5.0 the query wizard doesn't start - other wizards work.

With LO 3.5.1.2 the query wizard starts, but the condition is lost, when you go step by step through the wizard. The query is saved without condition:

SELECT "taxtest"."first name" AS "first name", "taxtest"."last name" AS "last name", "taxtest"."tax payer" AS "tax payer" FROM "taxtest" "taxtest"

You could chose a condition in step 3 of the wizard, but it is lost at step 8.

When you go back from step 8 to step 3 and chose a condition again it is shown in step 8 and produces an error:
...WHERE (tax payer = 1) 
must be: WHERE ( "taxtest"."tax payer" = 1 )

There seems to be something broken in the query-wizard since the beginning of LO 3.5. I have also tested LO 3.5.0rc1 again - the same bug as found in LO 3.5.1.2: No condition is saved by the wizard, go back, chose condition again, query produces an error.

So comment 3 must be changed a little bit. The wizards doesn't work right since LO 3.5.0rc1.

@Joel: I 'm only interested in all bugs of base. Have written most of the content of the German Base-Handbuch. I don't know, what the "QA IRC channel" is used for. Let us better discuss this per private mail ...
Comment 6 Commit Notification 2013-08-02 12:05:44 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=69a061509b728055c0f30f36427e2efa63424cbd

fdo#64117 *always* set the filter name to the correct name



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Lionel Elie Mamane 2013-08-02 13:08:52 UTC
(In reply to comment #0)
> Why on earth has it not been fixed yet It is a pretty basic
> and important part of Base.

Maybe because nobody reported it until fairly recently?

Fixed now (for 4.2.0 and planned for 4.1.1 and 4.0.6; we just missed 4.0.5.)
Comment 8 Commit Notification 2013-08-06 07:58:37 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5851030a8f97d5ea37464e4063e0b5d1c7cd7808&h=libreoffice-4-1

fdo#64117 *always* set the filter name to the correct name


It will be available in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2013-08-08 08:13:27 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4bf01389def5dc99a9f64ab551079e95d90501a6&h=libreoffice-4-0

fdo#64117 *always* set the filter name to the correct name


It will be available in LibreOffice 4.0.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.