mirror of https://mirror.osredm.com/root/redis.git
redis-benchmark: Fix broken protocol when used with -a or --dbnum (#8486)
Fix the pointers to the slot hash tags in the case of prefixed commands usage
i.e. AUTH / SELECT
It adjusts the pointers to the slot hash tags in the case of prefixed commands
usage as soon as we get the 1st reply (same like we already did for the random
strings within the command )
(cherry picked from commit efccd6353b
)
This commit is contained in:
parent
56ef0aa7c8
commit
840b393c06
|
@ -527,6 +527,9 @@ static void readHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
|
|||
* we need to randomize. */
|
||||
for (j = 0; j < c->randlen; j++)
|
||||
c->randptr[j] -= c->prefixlen;
|
||||
/* Fix the pointers to the slot hash tags */
|
||||
for (j = 0; j < c->staglen; j++)
|
||||
c->stagptr[j] -= c->prefixlen;
|
||||
c->prefixlen = 0;
|
||||
}
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue