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

Transactions in Query editor error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.0.0
    • Cheshire-Cat
    • query, UI
    • Untriaged
    • 1
    • Unknown

    Description

      when running below queries via "cbq" everything works as expected.

      INSERT INTO `test2`.`_default`.`_default` VALUES("cx4872", {"cid": 4872, "name":"John Doe", "balance":724.23});
      INSERT INTO `test2`.`_default`.`_default` VALUES("cx1924", {"cid": 1924, "name":"Bob Stanton", "balance":2735.48});
      BEGIN WORK;
      UPDATE `test2`.`_default`.`_default`
      SET balance = balance + 100
      WHERE cid = 4872;
      UPDATE `test2`.`_default`.`_default`
      SET balance = balance - 100
      WHERE cid = 1924;
      COMMIT WORK;
      

      but when i run the same via query editor, i get below error

        {
          "_sequence_num": 6,
          "_sequence_query": "\n COMMIT WORK;",
          "_sequence_query_status": 500,
          "_sequence_result": [
            {
              "code": 17002,
              "msg": "COMMIT statement is not supported outside the transaction",
              "query": "\n COMMIT WORK;"
            }
          ]
        }
      

      screenshots attached

      Attachments

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

        Activity

          People

            eben Eben Haber
            wael.emam Wael Emam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty