Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2512

QuerySQLCache fails to exclude paginated queries on cache hit

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.2
    • None
    • query

    Description

      While testing another issue, I encountered a bug with the QuerySQLCache. If you execute JPQL that has query pagination, we recognize that and exclude the query from the cache[1]. If you execute the query once without pagination, then execute it again with pagination we will 'forget' about the pagination and return the entire result set. I'll attach a JUnit showing the issue.

      [1] 1864 test WARN [main] openjpa.Runtime - Query "select e from simple e WHERE e.name=:name order by e.value" is removed from cache excluded permanently. The following query is not cached because the query uses pagination: select e from simple e WHERE e.name=:name order by e.value.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            curtisr7 Richard G. Curtis

            Dates

              Created:
              Updated:

              Slack

                Issue deployment