Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-5022

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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

        Hide
        slebresne Sylvain Lebresne added a comment -

        Committed, thanks

        Show
        slebresne Sylvain Lebresne added a comment - Committed, thanks
        Hide
        iamaleksey Aleksey Yeschenko added a comment -

        +1

        Show
        iamaleksey Aleksey Yeschenko added a comment - +1
        Hide
        slebresne 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
        slebresne 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).

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development