Created attachment 130120 [details]
Limit doesn't work with Firebird - ROWS isn't supported by GUI and HSQLDB
Open the attached database.
There are different Queries for the limit of a select.
Query_with_GUI_Limit is designed by the GUI but doesn't work.
Firebird doesn't know anything about the command LIMIT.
The other 3 queries
(...First_Skip, ...ROWS, ...ROWS_TO) show the limit, but this won't be supported by the GUI.
Don't think we could fix this in an easy way. Firebird doesn't work with LIMIT and HSQLDB doesn't work with ROWS. So we should remove or disable "Limit" and "Query properties" from the query-design in Firebird.
Arch Linux 64-bit, KDE Plasma 5
Build ID: 1a58cdf8af1aba52ce0a376666dd7d742234d7cf
CPU Threads: 8; OS Version: Linux 4.8; UI Render: default; VCL: kde4;
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on January 4th 2016
Tamas Bunth committed a patch related to this issue.
It has been pushed to "master":
tdf#105075 Firebird: Support Limit of query_GUI
It will be available in 6.1.0.
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:
Affected users are encouraged to test the fix and report feedback.
A polite ping to Tamas Bunth:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing?
(In reply to Xisco Faulí from comment #3)
> A polite ping to Tamas Bunth:
> Is this bug fixed? if so, could you please close it as RESOLVED FIXED ?
> Otherwise, Could you please explain what's missing?
@Tamas, Could you please reply to the questions above ?
(In reply to Xisco Faulí from comment #4)
> (In reply to Xisco Faulí from comment #3)
> > A polite ping to Tamas Bunth:
> > Is this bug fixed? if so, could you please close it as RESOLVED FIXED ?
> > Otherwise, Could you please explain what's missing?
> > Thanks
> @Tamas, Could you please reply to the questions above ?
Could I inject here before Tamas. No, it is not fixed in an acceptable way.
The Base firebird parser recognizes the word limit, but the SQL select statement generated then can not be passed directly to the firebird engine because the engine does not recognize the word.
Only if the select statement is run by Base with escape processing enabled will the querydef generate a usable SQL STATEMENT for the firebird engine. Try running the SQL shown to the user and it is rejected.
If a user experienced with Firebird sat down and entered a query by hand and they limited the results in the proper way with a FIRST and SKIP the Base parser would throw an error and the only way to run the querydef is with SQL DIRECT (escape processing off) enabled.
Also, the Firebird engine does recognize a one word shortcut like LIMIT and used at the back on the SELECT statement and that word is ROWS.
SELECT DISTINCT "VName", "NName" FROM "Persons" LIMIT 4
in firebird would become
SELECT DISTINCT "VName", "NName" FROM "Persons" ROWS 4
and is the same as
SELECT FIRST 4 DISTINCT "VName", "NName" FROM "Persons"
but in Base only first style is recognized by the designer
SELECT DISTINCT "VName", "NName" FROM "Persons" LIMIT 4
which is then quietly translated to the proper syntax when escape processing is handled,
IMO the firebird sdbc should be using the word ROWS not LIMIT for the designer generated SQL STATEMENT.
well, maybe I should reconsider that a bit.
I'm now looking at a connection in Base to other data types not just HSQL, text and csv and the query designer also uses the LIMIT syntax.
If LIMIT is to be a common syntax across all the drivers for the designer then that's great and right now that works. It also means the query definitions with escape processing active work as is for LIMIT after a migration from HSQLdb.
So, in that case then close this issue.
Then open an RFE to update to the SQL parser down the road to additionally recognize the string ROWS in place of limit for the firebird sdbc drivers.
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 http://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://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa
Thank you for helping us make LibreOffice even better for everyone!
We have two different behaviours now:
Start a query in GUI and set LIMIT in the GUI will work with internal Firebird.
Switching the query to direct SQL will throw an error.
Tested all with LO 188.8.131.52 beta2.
I would prefer this bug to set as FIXED, because it will work, if it isn't set to direct SQL.