Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-12088

Using Oracle DB the limit feature of AQL does not work


    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 4.7.5, 4.8.3, 4.11.0
    • Fix Version/s: 4.11.1
    • Component/s: AQL, Database
    • Labels:


      When using Oracle DB the "limit" feature of AQL does not work.

      Steps to reproduce this:

      1. Create an instance of Artifactory that uses Oracle DB
      2. Make sure you have some artifacts on there
      3. Run the following simple AQL query:

      curl -i -u<user>:<password> -XPOST http://<server-url>/artifactory/api/search/aql -d "items.find().limit(2)"

      It will not limit it to 2, but will return all results. Enabling debug logging shows the following query being run:

      select * from( select rownum rnum, inner_query.* from ( select distinct n.repo as itemRepo,n.node_path as itemPath,n.node_name as itemName,n.created as itemCreated,n.modified as itemModified,n.updated as itemUpdated,n.created_by as itemCreatedBy,n.modified_by as itemModifiedBy,n.node_type as itemType,n.bin_length as itemSize from nodes n left outer join node_props np100 on np100.node_id = n.node_id where ( np100.prop_key like 'docker.manifest' and n.node_type = 1) and(n.repo != 'auto-trashcan' or n.repo is null) ) inner_query where ROWNUM <= 9223372036854775807)where rnum > 0 '

      Notice the ROWNUM <= part, this value is incorrect, despite the value Artifactory shows at the end of the AQL results:

      "range" : {
      "start_pos" : 0,
      "end_pos" : 635,
      "total" : 635,
      "limit" : 2




            • Assignee:
              yinona Yinon Avraham
              daniela Daniel Augustine
              Assigned QA:
              Mor Iluz (Inactive)
            • Votes:
              1 Vote for this issue
              2 Start watching this issue


              • Created: