Commit Graph

454 Commits

Author SHA1 Message Date
Akihito Nakano
6b660bd554 Fix optional parameter getStats($type) (#337)
* Fix 'type' is optional
* Change argument name args -> type
2017-04-22 23:12:36 -07:00
Remi Collet
037ed570ba Fix build warnings (#329) 2017-02-22 00:22:11 +00:00
Aaron Stone
f7c92b0699 Update warning for touch command in binary protocol mode with libmemcached < 1.0.18 (#322) 2017-02-12 15:56:22 +00:00
Aaron Stone
08b39ed6b1 Ignore specific errors from memcached_dump for getAllKeys() with newer memcached servers (#315) 2017-02-07 12:34:41 +00:00
Aaron Stone
a86de05e86 Fix compiling with memcached binary protocol enabled (#312) 2017-02-07 12:34:23 +00:00
Aaron Stone
fa620a48c4 Restore php_libmemcached_compat with workaround for missing memcached_exists (#314)
This partially reverts commit c564fd875e from #295
2017-02-07 12:34:07 +00:00
Aaron Stone
218b019509 Fix memory leak from recent change to s_compress_value
Commit c85f34c01b cleaned up the function,
but missed an all-important efree(buffer) on the no-compression path.
2017-01-30 21:58:35 -08:00
Aaron Stone
6085768b48 Support for 64-bit offsets for increment and decrement (#306)
While the memcached protocol allows for 64-bit increments or decrements,
there is a quirk in the libmemcached API that the memcached_increment()
and memcached_decrement() functions take only a 32-bit adjustment value.

Since the memcached_increment_by_key() and memcached_decrement_by_key()
functions do accept 64-bit adjustment values, and the memcached_increment() and
memcached_decrement() functions are simply wrappers around those, we'll use
them directly and thus support 64-bit adjustments in all cases.
2017-01-26 02:06:30 +00:00
Aaron Stone
c85f34c01b Make sure that s_compress_value() will always leave a valid payload, even if it did not get compressed 2017-01-25 00:52:45 -08:00
Dick Tang
8924e3d72b fix: compression edge case (#255)
* correct the compression_factor calculation
* send uncompress value and proper set compressed flags when compression saving is too small
2017-01-24 18:17:07 +00:00
Samantha Quiñones
9debfacb8c Extended key checking to match the language of the memcached spec (#167)
Updated to php7 branch by Aaron Stone <aaron@serendipity.cx>
2017-01-24 01:12:03 -08:00
Aaron Stone
2af9b61590 Fix port number in getVersion (#300) (390) 2017-01-23 07:28:10 +00:00
Timandes White
b15936c0c0 Add optional parameter 'type' for method 'getStats' (#298) 2017-01-22 02:34:50 +00:00
Steven Hilder
5fee5fa909 Use bool data type for HAVE_* class constants (#166) 2017-01-20 19:02:47 +00:00
Arjen
c564fd875e Cleanup all checks for unsupported libmemcached versions (#295) 2017-01-20 13:26:57 +00:00
Arjen
7f6c333032 Cannot reset OPT_PREFIX_KEY #293 (#294)
- ZSTR_VAL(str) == 0 should be ZSTR_LEN(str) == 0
- add reset_keyprefix.phpt to package.xml
2017-01-20 12:20:42 +00:00
Aaron Stone
c032fba490 Whitespace 2016-10-11 08:03:55 -07:00
Aaron Stone
957024f777 Consistently use #ifdef instead of #if for autoconf definitions 2016-10-11 07:53:47 -07:00
Aaron Stone
583ecd68fa Merge pull request #234 from TysonAndre/document-sess_binary_protocol-php7
Document memcached.sess_binary_protocol
2016-08-08 00:02:05 -07:00
Xinchen Hui
4fa21116f1 Value pass to callback behavior consistently with get
(GET_EXTENED return array)
2016-07-26 19:11:54 +08:00
Xinchen Hui
155a864d22 Merge branch 'php7' of github.com:php-memcached-dev/php-memcached into php7 2016-07-26 18:40:13 +08:00
Xinchen Hui
56171da73e Fixed bug fetch only fetched one result 2016-07-26 17:07:26 +08:00
Xinchen Hui
4d9fda94df use zval_copy 2016-07-26 14:54:59 +08:00
Tyson Andre
045ab843ce Document memcached.sess_binary_protocol
And remove a TODO found in the code for allowing users to configure
whether or not to use binary protocols for sessions.

For issue #233
2016-07-25 13:46:39 -07:00
Xinchen Hui
bb4556a38c Partial fix build for memcached-protocl 2016-07-25 08:38:22 -07:00
Xinchen Hui
5e42fa985b Remove old version staff 2016-07-24 12:41:53 +08:00
Xinchen Hui
441168bebe avoided memory duplication 2016-07-24 12:37:29 +08:00
Xinchen Hui
f73befd69c Use zend_string_equals_literal 2016-07-23 22:35:13 +08:00
Xinchen Hui
6837d89494 Fixed test (tests/experimental/setmulti_badserialize.phpt) 2016-07-23 20:44:03 +08:00
Xinchen Hui
de9494f491 Fixed OOM (tests/experimental/locale_float.phpt) 2016-07-23 20:33:40 +08:00
Xinchen Hui
09e13048ec cleanup 2016-07-23 20:06:32 +08:00
Xinchen Hui
0acaa06d98 call_function always initialized retval 2016-07-23 15:14:48 +08:00
Xinchen Hui
d67517b04d Fixed tests/keys.phpt 2016-07-23 13:48:09 +08:00
Xinchen Hui
a1aab4e855 Avoid str duplication 2016-07-23 13:13:30 +08:00
Xinchen Hui
09e29e65de Fixed possible crash with opcache (We should never edit a zval in place) 2016-07-23 12:27:52 +08:00
Xinchen Hui
399c95c7f7 Cleanup 2016-07-23 12:11:31 +08:00
Xinchen Hui
8b27e5a079 Merge branch 'master' into php7
Conflicts:
	php_memcached.c
	php_memcached_session.c
2016-07-23 11:33:53 +08:00
Andrei Zmievski
a8ed24065c Merge pull request #247 from realmfoo/incrdecr_fix
Fix #243: Increment/decrement of an undefined key returns false with RES_SUCCESS
2016-06-11 19:39:49 -07:00
Pedro Magalhães
6e32d40133 Use a constant for object key max length 2016-06-11 01:45:40 +02:00
Pedro Magalhães
7266824772 Fix object key validation 2016-06-09 23:49:49 +02:00
Dick Tang
d9b2c9f384 fix: null-terminated zend_string in s_decompress_value 2016-06-09 00:43:42 +08:00
Konstantin Leboev
f31ad20468 Check the existence of an error, and only then if it is the maximum value. 2016-05-10 13:25:28 +03:00
Joe Watkins
6ee96cad7b Fix #238 (memory errors in s_stat_execute_cb) 2016-04-04 06:40:56 +01:00
Mikko Koppanen
7f4951fc1d Merge pull request #223 from xjewer/fix_arginfo
fix arginfo_get*
2016-03-22 23:18:04 +00:00
Mikko
4ee3819528 Fixes crash 2016-03-05 18:22:05 +00:00
xjewer
9b8126c043 fix arginfo_get* 2016-03-03 23:43:20 +03:00
Mikko
6ace07da69 Tests for default behavior 2016-02-17 14:39:49 +01:00
Mikko
a930b41fa1 Fixes memory errors, broken code, bugs etc 2016-02-06 05:07:52 +00:00
Mikko
27ad33b0c4 Fix serializers 2016-02-01 01:12:26 +00:00
Mikko
782077ce57 Fix json serializer 2016-01-31 23:11:11 +00:00