[Koha-bugs] [Bug 8594] A report containing a subquery that has a 'limit' will have that limit stripped out

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Aug 8 18:09:52 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8594

--- Comment #1 from Robin Sheat <robin at catalyst.net.nz> ---
Created attachment 11453
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11453&action=edit
Bug 8594 - prevent the report system from breaking some subqueries

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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list