mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
SCAN requires at least 1 argument
This commit is contained in:
parent
7f490b197f
commit
7a6cfb18f3
2
src/db.c
2
src/db.c
@ -337,6 +337,8 @@ void scanCommand(redisClient *c) {
|
|||||||
sds pat;
|
sds pat;
|
||||||
int patlen, patnoop = 1;
|
int patlen, patnoop = 1;
|
||||||
|
|
||||||
|
redisAssert(c->argc >= 2);
|
||||||
|
|
||||||
/* Use sscanf because we need an *unsigned* long */
|
/* Use sscanf because we need an *unsigned* long */
|
||||||
rv = sscanf(c->argv[1]->ptr, "%lu", &cursor);
|
rv = sscanf(c->argv[1]->ptr, "%lu", &cursor);
|
||||||
if (rv != 1) {
|
if (rv != 1) {
|
||||||
|
@ -210,7 +210,7 @@ struct redisCommand redisCommandTable[] = {
|
|||||||
{"pexpire",pexpireCommand,3,"w",0,NULL,1,1,1,0,0},
|
{"pexpire",pexpireCommand,3,"w",0,NULL,1,1,1,0,0},
|
||||||
{"pexpireat",pexpireatCommand,3,"w",0,NULL,1,1,1,0,0},
|
{"pexpireat",pexpireatCommand,3,"w",0,NULL,1,1,1,0,0},
|
||||||
{"keys",keysCommand,2,"rS",0,NULL,0,0,0,0,0},
|
{"keys",keysCommand,2,"rS",0,NULL,0,0,0,0,0},
|
||||||
{"scan",scanCommand,-1,"RS",0,NULL,0,0,0,0,0},
|
{"scan",scanCommand,-2,"RS",0,NULL,0,0,0,0,0},
|
||||||
{"dbsize",dbsizeCommand,1,"r",0,NULL,0,0,0,0,0},
|
{"dbsize",dbsizeCommand,1,"r",0,NULL,0,0,0,0,0},
|
||||||
{"auth",authCommand,2,"rslt",0,NULL,0,0,0,0,0},
|
{"auth",authCommand,2,"rslt",0,NULL,0,0,0,0,0},
|
||||||
{"ping",pingCommand,1,"rt",0,NULL,0,0,0,0,0},
|
{"ping",pingCommand,1,"rt",0,NULL,0,0,0,0,0},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user