Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-30

increment/decrement with non-existent keys and a default value cause a key's flags to be reset, making PHP type detection hard.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.0
    • 1.0
    • None
    • Security Level: Public
    • None

    Description

      According to http://code.google.com/p/memcached/wiki/BinaryProtocolRevamped#Increment,_Decrement an arithmetic operation on a non-existent key cause flags to be reset. The php extension requires flags to determine the php type of the stored value. that info gets lost.

      This demonstrates the issue:

      couchbase_increment($handle, "key", $offset = 1, $create = true, $initial_value = 2);
      couchbase_get($handle, "key");

      this currently results in

      PHP Warning: couchbase_get(): unknown payload type in %s
      PHP Warning: couchbase_get(): Faild to get a value from server: Generic error in %s

      the expected result is

      that couchbase_get() returns 3.

      Attachments

        For Gerrit Dashboard: PCBC-30
        # Subject Branch Project Status CR V

        Activity

          People

            laruence Xinchen Hui
            jan Jan Lehnardt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty