Uploaded image for project: 'OODT (Retired)'
  1. OODT (Retired)
  2. OODT-333

XMLPS query doesn't quote literal string

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.4
    • 0.4
    • xmlps
    • None

    Description

      As reported by sheryljj:

      (1) XMLQuery without parentheses:

      RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
      

      Generates the following SQL query:

      SELECT ... WHERE (baz = yes AND baz = 'no')
      

      If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
      If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.

      (2) XMLQuery with parentheses:

      RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
      

      Generates the following SQL query:

      SELECT ... WHERE (baz = yes OR baz = 'no')
      

      The expected SQL query is:

      SELECT ... WHERE (baz = 'yes' OR baz = 'no')
      

      Attachments

        1. rickdn-oodt-333.patch
          6 kB
          Ricky Nguyen
        2. rickdn-oodt-333-clean.patch
          3 kB
          Ricky Nguyen

        Activity

          People

            chrismattmann Chris A. Mattmann
            rickdn Ricky Nguyen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: