2341bd876a
If you had a report query that had a subquery in the fields list, and that subquery had a LIMIT specifier, then it would be removed which could break your query. This patch prevents this case from breaking by ensuring that only a LIMIT that follows the last WHERE in the query is removed. If you don't have a WHERE, then it will behave like it always did, removing all the cases of LIMIT (which would still break a subquery but this is a) more rare, and b) would require more intelligent parsing to deal with. Also adds test cases and function documentation. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Tested with this report: select biblionumber, (select itemnumber from items where items.biblionumber=biblio.biblionumber LIMIT 1) from biblio where biblionumber<1000; and it worked like a charm Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> |
||
---|---|---|
.. | ||
Budgets | ||
data/db_schemas | ||
db_dependent | ||
lib | ||
searchengine | ||
00-checkdatabase-version.t | ||
00-deprecated.t | ||
00-load.t | ||
00-merge-conflict-markers.t | ||
00-testcritic.t | ||
00-valid-xml.t | ||
AuthoritiesMarc.t | ||
AuthoritiesMarc_MARC21.t | ||
AuthoritiesMarc_UNIMARC.t | ||
Barcodes_annual.t | ||
Barcodes_EAN13.t | ||
Barcodes_hbyymmincr.t | ||
Barcodes_incremental.t | ||
Barcodes_PrinterConfig.t | ||
Barcodes_ValueBuilder.t | ||
Bookseller.t | ||
Boolean.t | ||
Branch.t | ||
Breeding.t | ||
Budgets.t | ||
Cache.t | ||
Cache_Memcached.t | ||
Calendar.t | ||
Category.t | ||
Charset.t | ||
Circulation_barcodedecode.t | ||
ClassSortRoutine.t | ||
ClassSortRoutine_Dewey.t | ||
ClassSortRoutine_Generic.t | ||
ClassSortRoutine_LCC.t | ||
ClassSource.t | ||
Contract.t | ||
Creators.t | ||
Dates.t | ||
DateUtils.t | ||
Debug.t | ||
dummy.t | ||
External_Syndetics.t | ||
Form_MessagingPreferences.t | ||
Heading.t | ||
ILSDI_Services.t | ||
ILSDI_Utility.t | ||
ImportBatch.t | ||
Input.t | ||
Installer_PerlDependencies.t | ||
Installer_PerlModules.t | ||
Installer_pm.t | ||
ItemCirculationAlertPreference.t | ||
ItemType.t | ||
Koha.t | ||
Labels.t | ||
Labels_split_ccn.t | ||
Labels_split_ddcn.t | ||
Labels_split_lccn.t | ||
Languages.t | ||
Letters.t | ||
Log.t | ||
Maintainance.t | ||
Makefile | ||
Matcher.t | ||
Members_Attributes.t | ||
Members_AttributeTypes.t | ||
Members_Messaging.t | ||
Message.t | ||
NewsChannels.t | ||
Output.t | ||
Output_JSONStream.t | ||
Overdues.t | ||
Patroncards.t | ||
Patroncards_Batch.t | ||
Patroncards_Layout.t | ||
Patroncards_Lib.t | ||
Patroncards_Patroncard.t | ||
Patroncards_Profile.t | ||
Patroncards_Template.t | ||
perlcriticrc | ||
Print.t | ||
Review.t | ||
rewrite-config-test.PL | ||
Ris.t | ||
RotatingCollections.t | ||
Scheduler.t | ||
Scrubber.t | ||
Search_PazPar2.t | ||
SIP_Sip.t | ||
smolder_smoke_signal | ||
SMS.t | ||
Stats.t | ||
TmplToken.t | ||
Utils.t | ||
VirtualShelves_Merge.t | ||
XSLT.t | ||
Z3950.t |