diff options
author | victor <viktork@sekindo.com> | 2020-05-14 16:02:26 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2020-05-22 12:25:17 +0300 |
commit | f13f9b7c7f5e3a7d286b412541199a408a0a98bd (patch) | |
tree | a3e4e10ad4cec12a56d088aedacda90dfa4897e9 | |
parent | 3ceb41065a381860c21129746d05b50acb51c23d (diff) |
During scan build the command using long type for iterator instead of int. Shall resolve issues with Redis Enterprise which uses big 64 bit numbers for cursor.
Conflicts:
redis.c
-rw-r--r-- | redis.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3402,7 +3402,7 @@ PHP_METHOD(Redis, command) { /* Helper to format any combination of SCAN arguments */ PHP_REDIS_API int redis_build_scan_cmd(char **cmd, REDIS_SCAN_TYPE type, char *key, int key_len, - int iter, char *pattern, int pattern_len, int count, + long iter, char *pattern, int pattern_len, int count, zend_string *match_type) { smart_string cmdstr = {0}; @@ -3433,7 +3433,7 @@ redis_build_scan_cmd(char **cmd, REDIS_SCAN_TYPE type, char *key, int key_len, /* Start the command */ redis_cmd_init_sstr(&cmdstr, argc, keyword, strlen(keyword)); if (key_len) redis_cmd_append_sstr(&cmdstr, key, key_len); - redis_cmd_append_sstr_int(&cmdstr, iter); + redis_cmd_append_sstr_long(&cmdstr, iter); /* Append COUNT if we've got it */ if(count) { @@ -3543,7 +3543,7 @@ generic_scan_cmd(INTERNAL_FUNCTION_PARAMETERS, REDIS_SCAN_TYPE type) { } // Format our SCAN command - cmd_len = redis_build_scan_cmd(&cmd, type, key, key_len, (int)iter, + cmd_len = redis_build_scan_cmd(&cmd, type, key, key_len, (long)iter, pattern, pattern_len, count, match_type); /* Execute our command getting our new iterator value */ |