★ wanayoo — archive 1999 https://github.com/phpredis/phpredis/issues/1Nouvelle recherche | Portail wanayoo
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renameNx delivers false on success #1

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

renameNx delivers false on success #1

tompro opened this issue Mar 28, 2011 · 6 comments

Comments

@tompro
Copy link

@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
Copy link
Contributor

@nicolasff nicolasff commented Mar 28, 2011

Hello,

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

@tompro
Copy link
Author

@tompro tompro commented Mar 29, 2011

Cool. Thanks for this fast reply.

@nicolasff
Copy link
Contributor

@nicolasff 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
Copy link
Author

@tompro 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
Copy link
Contributor

@nicolasff nicolasff commented Mar 30, 2011

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

@anton000 anton000 mentioned this issue Feb 10, 2014
@huyanping huyanping mentioned this issue May 15, 2015
@fotografi
Copy link

@fotografi fotografi commented Aug 12, 2016

No description provided.

@liupdhc liupdhc mentioned this issue Apr 12, 2017
michael-grunder pushed a commit that referenced this issue Nov 16, 2018
merge phpredis::develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.