Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
e5abf6ef
Commit
e5abf6ef
authored
Oct 25, 2011
by
antirez
Browse files
SCRIPT LOAD now returns the SHA1 instead of +OK
parent
8cb8d417
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
e5abf6ef
...
@@ -737,8 +737,8 @@ void scriptCommand(redisClient *c) {
...
@@ -737,8 +737,8 @@ void scriptCommand(redisClient *c) {
return
;
return
;
}
}
}
}
addReplyBulkCBuffer
(
c
,
funcname
+
2
,
40
);
sdsfree
(
sha
);
sdsfree
(
sha
);
addReply
(
c
,
shared
.
ok
);
}
else
{
}
else
{
addReplyError
(
c
,
"Unknown SCRIPT subcommand or wrong # of args."
);
addReplyError
(
c
,
"Unknown SCRIPT subcommand or wrong # of args."
);
}
}
...
...
tests/unit/scripting.tcl
View file @
e5abf6ef
...
@@ -187,7 +187,7 @@ start_server {tags {"scripting"}} {
...
@@ -187,7 +187,7 @@ start_server {tags {"scripting"}} {
list
\
list
\
[
r script load
"return 'loaded'"
]
\
[
r script load
"return 'loaded'"
]
\
[
r evalsha b534286061d4b9e4026607613b95c06c06015ae8 0
]
[
r evalsha b534286061d4b9e4026607613b95c06c06015ae8 0
]
}
{
OK
loaded
}
}
{
b534286061d4b9e4026607613b95c06c06015ae8
loaded
}
}
}
start_server
{
tags
{
"scripting repl"
}}
{
start_server
{
tags
{
"scripting repl"
}}
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment