|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58537 Memcached setMulti error
Submitted: 2009-02-05 23:50 UTC Modified: 2009-02-06 14:19 UTC
From: eugenevt at gmail dot com Assigned:
Status: Closed Package: memcached (PECL)
PHP Version: 5_2 CVS-2009-02-05 (dev) OS: Linux 2.6.27-gentoo-r7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: eugenevt at gmail dot com
New email:
PHP Version: OS:


 [2009-02-05 23:50 UTC] eugenevt at gmail dot com
Error setMulti

Reproduce code:
$mc = new Memcached();
$mc->addServer( '', 11211); // This is 'localhost'
$mc->addServer( '', 11211);
$mc->addServer( '', 11211);
$a = array('k1'=>'v1', 'k2'=>'v2', 'k3'=>'v3', 'k4'=>'v4', 'k5'=>'v5', 'k6'=>'v6', 'k7'=>'v7', 'k8'=>'v8', 'k9'=>'v9', 'k10'=>'v10', 'k11'=>'v11', 'k12'=>'v12');
$b = array( 0=>'k1', 1=>'k2', 2=>'k3', 3=>'k4', 4=> 'k5', 5=>'k6', 6=>'k7', 7=>'k8', 8=>'k9', 9=>'k10', 10=>'k11', 11=>'k12');
var_dump($mc->setMulti($a)); //  result bool(true)
var_dump($mc->getMulti($b)); // !!!   Restore only keys 'k2' and 'k3'
foreach($a as $k=>$val) { var_dump($mc->set($k, $val, 0)); }
var_dump($mc->getMulti($b)); // All Ok!

Expected result:
array(12) {
  string(3) "v10"
  string(3) "v11"
  string(3) "v12"
  string(2) "v1"
  string(2) "v2"
  string(2) "v3"
  string(2) "v4"
  string(2) "v5"
  string(2) "v6"
  string(2) "v7"
  string(2) "v8"
  string(2) "v9"

Actual result:
array(2) {
  string(2) "v2"
  string(2) "v3"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-06 14:19 UTC]
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at

Fixed in 0.1.2 release.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 03:01:32 2024 UTC