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

Using Escaping and $nmatch in AQL throws SQL exception In addition there is no escaping to "%"

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 4.8.1
    • Fix Version/s: 4.10.0
    • Component/s: AOL
    • Labels:
      None

      Description

      1 .Running the following query in AQL:

      items.find({"repo" : {"$nmatch" : "_bla_bl*"}})

      will throw the following exception:

      Failed to execute the following sql querySqlQuery{query='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 where n.updated < ? and((n.node_path not like escape '^' ? or n.node_path is null) and(n.node_path not like ? or n.node_path is null)) and n.created < ? and n.modified < ? and n.repo = ? and n.node_type = ? '.......
      cause: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' '%XXXXX_%' or n.node_path is null) and(n.node_path not like 'XXXXXXX' at line 1

      2. AQL doesn't support escaping to "%"

        Attachments

          Activity

            People

            • Assignee:
              gidis Gidi Shabat
              Reporter:
              gidis Gidi Shabat
              Assigned QA:
              Mor Iluz (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: