mirror of https://mirror.osredm.com/root/redis.git
Merge 1030ca5e6b
into ebf19e4c92
This commit is contained in:
commit
01a09e8b44
|
@ -406,7 +406,7 @@ static int scriptVerifyWriteCommandAllow(scriptRunCtx *run_ctx, char **err) {
|
|||
if (run_ctx->flags & SCRIPT_READ_ONLY &&
|
||||
(run_ctx->c->cmd->flags & (CMD_WRITE|CMD_MAY_REPLICATE)))
|
||||
{
|
||||
*err = sdsnew("Write commands are not allowed from read-only scripts.");
|
||||
*err = sdsnew("Write commands are not allowed from read-only scripts");
|
||||
return C_ERR;
|
||||
}
|
||||
|
||||
|
|
|
@ -1676,7 +1676,7 @@ void luaCallFunction(scriptRunCtx* run_ctx, lua_State *lua, robj** keys, size_t
|
|||
final_msg = sdscatfmt(final_msg, "-%s",
|
||||
err_info.msg);
|
||||
if (err_info.line && err_info.source) {
|
||||
final_msg = sdscatfmt(final_msg, " script: %s, on %s:%s.",
|
||||
final_msg = sdscatfmt(final_msg, ". script: %s, on %s:%s.",
|
||||
run_ctx->funcname,
|
||||
err_info.source,
|
||||
err_info.line);
|
||||
|
|
|
@ -2359,7 +2359,7 @@ start_server {tags {"scripting"}} {
|
|||
assert_equal [
|
||||
r eval_ro {
|
||||
local t = redis.pcall('set','x','y')
|
||||
if t['err'] == "ERR Write commands are not allowed from read-only scripts." then
|
||||
if t['err'] == "ERR Write commands are not allowed from read-only scripts" then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
|
Loading…
Reference in New Issue