Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-18722

N1QL: Copying and pasting prepared statement text or condition does not evaluate >,<,>=,<=

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.6.0, 5.0.0
    • 4.5.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      Issue a prepared statement:
      go_cbq> prepare temp1 from select COUNT(tasks_points.task1), tasks_points.task1 AS task from default where join_day>=$join_day and join_mo>=$1 GROUP BY tasks_points.task1 HAVING COUNT(tasks_points.task1) <$2 AND (MIN(join_day)=$3 OR MAX(join_yr=$4));

      The text and condition in output of above statement contain unicode characters instead of >= and <.

      "text": "prepare temp1 from select COUNT(tasks_points.task1), tasks_points.task1 AS task from default where join_day\u003e=$join_day and join_mo\u003e$1 GROUP BY tasks_points.task1 HAVING COUNT(tasks_points.task1) \u003e $2 AND (MIN(join_day)=$3 OR MAX(join_yr=$4))"

      When I copy the text and paste in cbq or go_cbq,hit enter.
      The output is:
      "msg": "syntax error - at u003e"

      It should have evaluated the unicode characters in the text.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Prerna.Manaktala Prerna Manaktala (Inactive)
              Prerna.Manaktala Prerna Manaktala (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty