php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54360 memcache client library uses 32bit for increment/decrement
Submitted: 2011-03-23 14:34 UTC Modified: 2011-03-24 07:27 UTC
From: jakub dot lopuszanski at nasza-klasa dot pl Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: Irrelevant OS: debian
Private report: No CVE-ID: None
 [2011-03-23 14:34 UTC] jakub dot lopuszanski at nasza-klasa dot pl
Description:
------------
even if you compile everything on 64-bit machine, the code of 
static int mmc_incr_decr(mmc_t *mmc, int cmd, char *key, int key_len, int value, long *number TSRMLS_DC) /* {{{ */

still forces the value to be 32 bit signed integer, even though specification says about 64bit integers

Test script:
---------------
$memcache->increment('whatever',3000000000);

Expected result:
----------------
incrementing by 3 000 000 000

Actual result:
--------------
trying to "increment" by negative value

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-24 07:27 UTC] aharvey@php.net
-Status: Open +Status: Bogus
 [2011-03-24 07:27 UTC] aharvey@php.net
Please report this on the PECL bug tracker at
http://pecl.php.net/bugs/report.php?package=memcache
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 13 14:01:33 2024 UTC