renameNx delivers false on success #1

Closed
tompro opened this Issue Mar 28, 2011 · 6 comments

Comments

Projects
None yet
3 participants
@tompro

tompro commented Mar 28, 2011

If I use renameNx and rename a key to a key that is currently not existing the operation is performed well on Redis server. Nevertheless I get false as result from phpredis.

The follwing test fails:

$redis->set('oldkey', 'value');
$this->assertTrue(
    $redis->renameNx('oldkey', 'newkey')
);
@nicolasff

This comment has been minimized.

Show comment Hide comment
@nicolasff

nicolasff Mar 28, 2011

Contributor

Hello,

Thanks for this report. I'll have a look tomorrow morning and integrate your test.

Contributor

nicolasff commented Mar 28, 2011

Hello,

Thanks for this report. I'll have a look tomorrow morning and integrate your test.

@tompro

This comment has been minimized.

Show comment Hide comment
@tompro

tompro Mar 29, 2011

Cool. Thanks for this fast reply.

tompro commented Mar 29, 2011

Cool. Thanks for this fast reply.

@nicolasff

This comment has been minimized.

Show comment Hide comment
@nicolasff

nicolasff Mar 30, 2011

Contributor

Hello again,

It seems that the either the return value of RENAMENX has changed in Redis itself, or this bug has been here for a long time. I have fixed this issue and added a unit test.

Could you please confirm that it works as expected?

Contributor

nicolasff commented Mar 30, 2011

Hello again,

It seems that the either the return value of RENAMENX has changed in Redis itself, or this bug has been here for a long time. I have fixed this issue and added a unit test.

Could you please confirm that it works as expected?

@tompro

This comment has been minimized.

Show comment Hide comment
@tompro

tompro Mar 30, 2011

Works like a charm. All green :) . During the next weeks I am going to cover most phpredis functions with tests as I am currently building a higher level library. I'll let you know when I encounter something else. I hope this is not very anoying for you :) .

tompro commented Mar 30, 2011

Works like a charm. All green :) . During the next weeks I am going to cover most phpredis functions with tests as I am currently building a higher level library. I'll let you know when I encounter something else. I hope this is not very anoying for you :) .

@tompro tompro closed this Mar 30, 2011

@nicolasff

This comment has been minimized.

Show comment Hide comment
@nicolasff

nicolasff Mar 30, 2011

Contributor

Not at all, thanks for reporting this. The more I can fix, the better it will be :-)

Contributor

nicolasff commented Mar 30, 2011

Not at all, thanks for reporting this. The more I can fix, the better it will be :-)

@ghost ghost referenced this issue Jun 11, 2012

Open

Database failover #203

@anton000 anton000 referenced this issue Feb 10, 2014

Closed

Cant connect #433

@huyanping huyanping referenced this issue May 15, 2015

Closed

make error #601

@bigfg bigfg referenced this issue Aug 9, 2016

Closed

phpredis coredump #921

@fotografi

This comment has been minimized.

Show comment Hide comment
@fotografi

fotografi Aug 12, 2016

No description provided.

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment