diff --git a/src/replication.cpp b/src/replication.cpp index 4f66bab99..e19daa267 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -3277,7 +3277,7 @@ void replicaReplayCommand(client *c) cFake->lock.lock(); cFake->authenticated = c->authenticated; cFake->puser = c->puser; - cFake->querybuf = sdscat(cFake->querybuf,(sds)ptrFromObj(c->argv[2])); + cFake->querybuf = sdscatsds(cFake->querybuf,(sds)ptrFromObj(c->argv[2])); selectDb(cFake, c->db->id); processInputBuffer(cFake, (CMD_CALL_FULL & (~CMD_CALL_PROPAGATE))); cFake->lock.unlock(); diff --git a/tests/integration/replication-active.tcl b/tests/integration/replication-active.tcl index dfb89f603..99e0dc006 100644 --- a/tests/integration/replication-active.tcl +++ b/tests/integration/replication-active.tcl @@ -49,6 +49,15 @@ start_server {tags {"active-repl"} overrides {active-replica yes}} { } } + test {Active replicas propogate binary} { + $master set binkey "\u0000foo" + wait_for_condition 50 500 { + [string match *foo* [$slave get binkey]] + } else { + fail "replication failed to propogate binary data" + } + } + test {Active replicas WAIT} { # Test that wait succeeds since replicas should be syncronized $master set testkey foo