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

query with encoded_plan erroneously sets wrong plan in prepareds cache

    XMLWordPrintable

Details

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

    Description

      execute the following sequence

      prepare st1 from select * from `travel-sample`;
      delete from system:prepareds where name = 'st1';
      prepare sty from select * from `beer-sample`;

      curl -v "http://localhost:8093/query/service" -H "Content-Type: application/json" -d '

      { "prepared": "st1","encoded_plan": "H4sI....."}

      '

      you get a 4080 back (encoded_plan parameter does not match encoded_plan for prepared statement).

      do it again

      curl -v "http://localhost:8093/query/service" -H "Content-Type: application/json" -d '

      { "prepared": "st1","encoded_plan": "H4sI..."}

      '

      you get rows from travel-sample, not beer-sample.

      select * from system:prepareds;

      "results": [
      {
      "prepareds":

      { "encoded_plan": "H4sIAAAJb..", "name": "st1", "statement": "prepare st1 from select * from `travel-sample`", "uses": 0 }

      }
      ]

      oops!

      Attachments

        Issue Links

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

          Activity

            People

              marco.greco Marco Greco (Inactive)
              marco.greco Marco Greco (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty