Problems with increment/decrement with large deltas in pecl memcache

17 views
Skip to first unread message

Jakub Łopuszański

unread,
Dec 7, 2010, 4:07:01 AM12/7/10
to memc...@googlegroups.com

1749

command_len = spprintf(&command, 0, "incr %s %d", key, value);

It should not be %d, as it spoils the fun of using 64-bit integers.

Consider this example:

<?php
require('autoload.php');
$bazylion = 10000000000;
var_dump($bazylion);
$c = new CacheKey('default','x');
$c->set(9);
var_dump($c->get());
$c->increment($bazylion);
var_dump($c->get());
$c->decrement($bazylion);
var_dump($c->get());
?>


int(10000000000)
string(1) "9"
string(10) "1410065417"
string(10) "9         "

This is quite annoying.

pravesh suyal

unread,
Dec 8, 2010, 12:59:14 AM12/8/10
to memc...@googlegroups.com


pravesh suyal


--- On Tue, 12/7/10, Jakub Łopuszański <jakub.lo...@nasza-klasa.pl> wrote:

Eric Lambert

unread,
Dec 8, 2010, 1:31:36 AM12/8/10
to memc...@googlegroups.com
On 12/7/10 9:59 PM, pravesh suyal wrote:

rm -rf pravesh

http://groups.google.com/support/bin/answer.py?hl=en&answer=46608

Trond Norbye

unread,
Dec 8, 2010, 2:34:51 AM12/8/10
to memc...@googlegroups.com, memc...@googlegroups.com
I got an error when I executed the command..

'No such file'


Should I run the command as root?

Trond ;)

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages