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

Couchbase.so intermittently returns incorrect value for integer values

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.0.2
    • 1.0, 1.0.1
    • library
    • Security Level: Public
    • None
    • OS X 10.7, PHP 5.3.8, Apache 2.2.21, Couchbase.so 1.0.0, Couchbase Server 1.8.0
    • Release Note

    Description

      See http://www.couchbase.com/forums/thread/php-ext-incorrect-data-returned

      I'm setting various integers to different keys. When I subsequently get them, the couchbase.so result "mixes" the values. I can verify via the command line that the values are set correctly, but they're not the same as what couchbase.so returns to me.

      PHP Example:
      $cb->set("userid", 642349292);
      $cb->set("productid", 5);
      $user_id = $cb->get("userid");
      echo $user_id."\n";
      $pid = $cb->get("productid");
      echo $pid."\n";

      This outputs:
      642349292
      542349292

      On the command line however:
      get userid
      VALUE userid 1 9
      642349292
      END
      get productid
      VALUE productid 1 1
      5
      END

      I can "work around" this (and the other issue), by setting integers as strings, but something is clearly the matter with couchbase.so.

      If I set the integers as strings, like this:

      $cb->set("userid", "642349292");
      $cb->set("productid", "5");
      $user_id = $cb->get("userid");
      echo $user_id."\n";
      $pid = $cb->get("productid");
      echo $pid."\n";

      the subsequent output is correct:

      642349292
      5

      Attachments

        Issue Links

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

          Activity

            People

              ingenthr Matt Ingenthron
              mssteuer Michael Steuer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty