156 Commits

Author SHA1 Message Date
Pavlo Yatsukhnenko
6b411aa88b Issue #1508
Wrap all calls of `call_user_function` into `ra_call_user_function`
where AUTH command sended before function call.
2019-02-27 15:34:24 +02:00
Pavlo Yatsukhnenko
339cfa2bb6 Fix RedisArray authentication 2019-02-26 17:44:08 +02:00
Pavlo Yatsukhnenko
b5549cffd2 RedisArray auth.
Issue #1508
2019-02-19 21:48:32 +02:00
Pavlo Yatsukhnenko
8cd165dfc1 Use zend_string for storing key hashing algorithm 2019-02-19 13:54:34 +02:00
Pavel Yatsukhnenko
e9e4783456 Fix build warning 2019-01-21 11:56:15 +02:00
Pavlo Yatsukhnenko
850027ffd3 Different key hashing algorithms from hash extension. 2019-01-03 16:17:20 +02:00
Pavlo Yatsukhnenko
bb32e6f3a0 Implement consistent hashing algorithm for RedisArray 2018-12-22 15:31:51 +02:00
Pavlo Yatsukhnenko
3e7e1c833d Fix regression added in 602740d3 2018-12-22 15:30:46 +02:00
Pavlo Yatsukhnenko
602740d35a Use zend_string for storing RedisArray hosts 2018-12-19 10:16:54 +02:00
Pavlo Yatsukhnenko
c0793e8be4 Remove unused parameter lazy_connect from redis_sock_create 2018-11-21 13:39:50 +02:00
Pavlo Yatsukhnenko
6f7ddd275a Fix coverity scan warnings 2018-11-07 14:03:35 +02:00
Pavlo Yatsukhnenko
9cd059117a Refactor RedisArray
Change type of returning value from `char *` to `zend_string *` for
`ra_extract_key` and `ra_call_extractor` functions.
Store keys as `zend_string *` in RedisArray::mset.
2018-01-29 22:37:36 +02:00
Pavlo Yatsukhnenko
837dee471c Issue #1292
Revert broken in c9df77d RA hashing impl.
2018-01-02 13:35:08 +02:00
Pavlo Yatsukhnenko
75e7c81dad Revert "Refactor ra_extract_key"
This reverts commit 621afa6c6d.
2017-10-19 16:46:32 +03:00
Pavlo Yatsukhnenko
621afa6c6d Refactor ra_extract_key
We don't need to copy extracted key part since we don't change it.
2017-10-19 16:11:31 +03:00
Pavlo Yatsukhnenko
0115666e59 Add PHPREDIS_GET_OBJECT macros 2017-10-05 15:27:18 +03:00
michael-grunder
345fc7fc9f Destroy all tabs :-) 2017-09-28 15:44:18 -07:00
Pavlo Yatsukhnenko
4a0a46b4cb Check number of elements in incoming array-argument 2017-08-28 16:17:05 +03:00
Pavlo Yatsukhnenko
c9df77db57 ra_call_distributor returns position or -1 in case of error 2017-08-23 15:31:01 +03:00
Pavlo Yatsukhnenko
142b51ded9 refactoring
Small change php5 implementation of ZEND_HASH_FOREACH_* macroses.
Use ZEND_HASH_FOREACH_VAL in ra_get_key_type.
Allocate array via MAKE_STD_ZVAL in HANDLE_MULTI_EXEC macro.
2017-08-11 16:20:40 +03:00
Pavlo Yatsukhnenko
2c8de47f78 Use ZEND_HASH_FOREACH_VAL in ra_load_hosts. 2017-08-09 16:32:57 +03:00
Pavlo Yatsukhnenko
a56ed7f9f9 Change type of RedisArray pure_cmds to HashTable 2017-08-04 13:56:48 +03:00
Pavlo Yatsukhnenko
577a919099 Remove ra_rehash_scan 2017-08-04 09:57:47 +03:00
Pavlo Yatsukhnenko
471ce0724d Fix valgrind warnings 2017-08-02 17:42:34 +03:00
Pavlo Yatsukhnenko
4e32254ec2 Use ZSTR_VAL and ZSTR_LEN macroses to access zend_string fields 2017-08-02 13:20:30 +03:00
Pavlo Yatsukhnenko
faac8b0600 CID 158616 2017-07-28 14:50:41 +03:00
Pavlo Yatsukhnenko
735025d700 Fix some static analyzer warnings
Two types of warnings were fixed in this commit:
1. The left operand of '<=' is a garbage value
2. Function call argument is an uninitialized value
2017-07-19 15:13:33 +03:00
Pavlo Yatsukhnenko
d0b9c5fd4e Refactor ra_init_function_table
Remove re-adding HGET element.
Reorder commands alphabetically.
Replace tabs with spaces.
2017-06-09 23:22:23 +03:00
Pavlo Yatsukhnenko
47d3722dec Remove ra_find_key + use return_value instead of stack allocated z_tmp inra_forward_call 2017-04-27 17:46:49 +03:00
Pavlo Yatsukhnenko
b56dc49eec Processing read_timeout parameter + update docs 2017-04-11 15:22:46 +03:00
Pavlo Yatsukhnenko
f81694e69c Use crc32 table from PHP distro (#1144)
* Use crc32 table from PHP distro

* Remove rcrc32 function
2017-04-03 21:55:05 +03:00
Pavlo Yatsukhnenko
e7ad31e515 Remove unused force_connect parameter from redis_sock_server_open function. 2017-03-29 23:33:53 +03:00
Pavlo Yatsukhnenko
635c3a651b RedisArray segfault fix 2017-02-23 13:39:05 +02:00
Pavlo Yatsukhnenko
8fa85afa7a redis_object 2017-02-10 17:41:03 +02:00
Pavlo Yatsukhnenko
a765f8d4b5 redis_array_object 2017-02-08 23:13:28 +02:00
Pavlo Yatsukhnenko
495e5df4f7 refactoring 2017-01-19 00:10:13 +02:00
michael-grunder
d0b8011a9a Fix compiler warnings.
Changed zend hash function overrides to extern in the header, and
then defined them in library.c

Created a simple macro to suppress "set but not used" warnings,
which differ depending on build environment (php 5 vs php 7).
2016-12-18 21:06:38 -08:00
Pavlo Yatsukhnenko
5a35e7edd4 memory leak 2016-12-05 23:54:00 +02:00
Pavlo Yatsukhnenko
cb4fd619c0 memory leak 2016-12-05 16:53:24 +02:00
Pavlo Yatsukhnenko
a23e36f208 zval_get_string
Added gc attribute to zend_string (for zend_string_release).
Added function zval_get_string and replace convert_to_string with it.
2016-12-02 16:04:59 +02:00
Pavlo Yatsukhnenko
433caf4788 refactoring 2016-11-21 17:46:58 +02:00
Pavlo Yatsukhnenko
ad9f4ea4f6 fix crash on FreeBSD and CentOS 2016-11-21 09:47:20 +02:00
Pavlo Yatsukhnenko
3d7da1fdb6 refactoring 2016-11-20 21:07:24 +02:00
Pavlo Yatsukhnenko
14c19fa3a0 refactoring 2016-11-16 18:05:27 +02:00
Pavlo Yatsukhnenko
d7d18bfa05 refactoring
Use estrndup instead os estrdup/emalloc+memcpy
2016-11-13 15:12:40 +02:00
Pavlo Yatsukhnenko
19f5f708c2 WIP: php7 compatibility 2016-11-11 23:04:27 +02:00
Pavlo Yatsukhnenko
5f15ce222f WIP: php7 compatibility 2016-11-09 21:03:36 +02:00
Pavlo Yatsukhnenko
04a7327af8 WIP: php7 compatibility 2016-11-08 20:11:51 +02:00
Pavlo Yatsukhnenko
5de84b3d01 WIP: php7 compatibility 2016-11-07 20:18:57 +02:00
Pavlo Yatsukhnenko
8f3deb7f34 Fix static analyzer warnings 2016-11-04 18:21:42 +02:00