Cassandra
  1. Cassandra
  2. CASSANDRA-5022

Can't prepare an UPDATE query with a counter column (CQL3)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Fix Version/s: 1.2.0 rc1
    • Component/s: None
    • Labels:
      None

      Description

      CQL3, binary protocol:

      demo(id int primary key, counter counter)

      Preparing "UPDATE test.counters SET counter = counter + ? WHERE id = ?" yields 8704, "Invalid operation for commutative columnfamily counters" error.

      1. 5002.txt
        9 kB
        Sylvain Lebresne

        Activity

        Aleksey Yeschenko created issue -
        Hide
        Sylvain Lebresne added a comment -

        Attaching patch to fix that. The patch also move some small bit of validation that were done at execution time to preparation time (since there is no good reason not to do it there).

        Show
        Sylvain Lebresne added a comment - Attaching patch to fix that. The patch also move some small bit of validation that were done at execution time to preparation time (since there is no good reason not to do it there).
        Sylvain Lebresne made changes -
        Field Original Value New Value
        Attachment 5002.txt [ 12555958 ]
        Sylvain Lebresne made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Fix Version/s 1.2.0 rc1 [ 12323481 ]
        Aleksey Yeschenko made changes -
        Reviewer iamaleksey
        Hide
        Aleksey Yeschenko added a comment -

        +1

        Show
        Aleksey Yeschenko added a comment - +1
        Hide
        Sylvain Lebresne added a comment -

        Committed, thanks

        Show
        Sylvain Lebresne added a comment - Committed, thanks
        Sylvain Lebresne made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Gavin made changes -
        Workflow no-reopen-closed, patch-avail [ 12736713 ] patch-available, re-open possible [ 12753696 ]
        Gavin made changes -
        Workflow patch-available, re-open possible [ 12753696 ] reopen-resolved, no closed status, patch-avail, testing [ 12757958 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        23h 41m 1 Sylvain Lebresne 04/Dec/12 18:06
        Patch Available Patch Available Resolved Resolved
        13h 57m 1 Sylvain Lebresne 05/Dec/12 08:03

          People

          • Assignee:
            Sylvain Lebresne
            Reporter:
            Aleksey Yeschenko
            Reviewer:
            Aleksey Yeschenko
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development