Commit Graph

2055 Commits

Author SHA1 Message Date
Pavlo Yatsukhnenko 017ba800b1 Merge pull request #1447 from yulonghu/work
Fix function close() return value
2018-11-08 09:27:27 +02:00
fanjiapeng 2a1ef961a2 Close() Optimization 2018-11-08 15:18:46 +08:00
fanjiapeng 86ecbb7a21 Fix function close() return value 2018-11-08 11:19:25 +08:00
Pavlo Yatsukhnenko 4e2de1581f Fix redis_session
Prevent infinite loop when redis_sock_server_open failed.
Check pool->lock_status.session_key is not NULL in PS_CLOSE_FUNC.
2018-11-07 17:48:58 +02:00
Pavlo Yatsukhnenko 6f7ddd275a Fix coverity scan warnings 2018-11-07 14:03:35 +02:00
Pavlo Yatsukhnenko 071a1d5476 Fix memory leak when aquiring lock 2018-11-07 10:17:30 +02:00
Michael Grunder 92f14b1480 Fix a memory leak when regenerating IDs (#1445)
Make sure we free any existing session lock key if we're going to
update it.  Otherwise we will leak that memory.
2018-11-06 21:20:06 -08:00
michael-grunder eb8bcc1de8 Comment fix: No longer always success 2018-11-06 09:00:55 -08:00
Michael Grunder 18dc2aacd6 32bit xclaim fix (#1444)
This should fix the XCLAIM issue on 32-bit PHP installs.

This change will allow the user to pass the XCLAIM TIME option pretty much any way they want (string, long, or float) and it should work.  Note that in 32-bit PHP they will only be able to pass exact values <= 2^53 as PHP will use a double precision floating point for integer overflows.
2018-11-06 08:46:02 -08:00
Pavlo Yatsukhnenko b5093910b9 Fix warning: 'id' may be used uninitialized in this function 2018-10-26 14:25:09 +03:00
Pavlo Yatsukhnenko 0c925ce756 Merge pull request #1427 from twose/warning
Fix warning.
2018-10-26 14:10:35 +03:00
Pavlo Yatsukhnenko fe4ba101de Merge pull request #1438 from remicollet/issue-ww
build warnings
2018-10-26 14:10:19 +03:00
Remi Collet 51027044f7 fix some build warnings 2018-10-26 12:30:03 +02:00
Pavlo Yatsukhnenko dad0a4d02a Merge remote-tracking branch 'upstream/issue-1425' into develop 2018-10-23 09:07:45 +03:00
Pavlo Yatsukhnenko 25b043ce16 Issue #1434
Fix incorrect arginfo for `Redis::sRem` and `Redis::multi`
2018-10-23 09:01:18 +03:00
michael-grunder 0b97ec3739 Update STREAM API to handle STATUS -> BULK reply change
Right before Redis 5.0 was released, the api was changed to send
message ids as BULK instead of STATUS replies.
2018-10-19 07:12:08 -07:00
michael-grunder d11724260f Simplify short-circuit logic 2018-10-17 05:14:02 -07:00
michael-grunder 07ef7f4e65 Make our timeout or response error handling more explicit.
Although a -1 return value from cluster_check_response is likely
a timeout, it is not the only possibility, so handle the loop
timeout and error response in distinct ways.
2018-10-16 21:31:52 -07:00
Marius Meissner 7e3362c7ff PHPREDIS-1422: Added hint for session locking support 2018-10-15 10:14:01 -07:00
michael-grunder 27df92208a Treat a -1 response from cluster_check_response as a timeout.
When cluster_check_response returns -1 this can be treated as a
timeout.

Note that there is one non-timout condition which can
cause a -1 response, but that is a corrupted MOVE/ASK reply
which can *probably* be treated as a timeout as well,
because it means that something has gone horribly wrong
with the connection.

Addresses #1425
2018-10-14 11:50:47 -07:00
twosee 8b0f28cdce Fix warning. 2018-10-13 12:59:35 +08:00
michael-grunder 2e412373c4 Use a ZSET insted of SET for EVAL tests
Redis SET type is unordered which could break our eval tests
so use a ZSET instead where the order is deterministic.
2018-10-12 08:36:48 -07:00
Remi Collet 0af2a7fe06 missing space between command and args 2018-10-12 00:24:16 -07:00
Marc de Jonge cd6ebc6d7f Reset the socket after a timeout to make sure no wrong data is received (#1417)
* Reset the socket after a timeout to make sure no wrong data is received

* Remove the lazy_connect completely

* Missing TSRMLS_CC

* Remove redundant check if the stream exists

* Add the redis_sock_server_open to the CLUSTER_SEND_PAYLOAD macro
2018-10-08 08:57:51 +03:00
michael-grunder 1b7fe98ab7 Undo breaking changes 2018-10-04 11:56:46 -07:00
michael-grunder 4ffd75425c It's preferable to commit code that compiles 2018-10-04 11:42:28 -07:00
michael-grunder 5b483b701c Commit accidentally missed no-op macro change 2018-10-04 09:59:29 -07:00
Pavlo Yatsukhnenko bfa6170001 Fix scan-build warnings 2018-10-01 09:44:47 +03:00
nolimitdev bedf3e8f68 Update README.markdown
Fix incorrect syntax of php directives for session locking
2018-09-30 12:01:47 -07:00
nolimitdev 431b8d0317 Update README.markdown
Fix obsolete links and structure in first chapter of table of contents
2018-09-30 12:01:47 -07:00
Michael Grunder 2c9e057236 Streams (#1413)
Streams API
2018-09-29 11:59:01 -07:00
michael-grunder bfd274712e Modify session testing logic
In the event that the test PHP executable has been built with redis
and/or igbinary support built statically, we don't need to try and
find it by adding --no-php-ini and the extension directives themselves.

This fixes the test execution when php has the required extensions
already.
2018-09-20 22:23:40 -07:00
Lucas Courot 2f694e1089 Fix typo 2018-09-19 07:56:35 -07:00
michael-grunder d4a086979f Allow '-' and '+' arguments and add tests for zLexCount and zRemRangeByLex 2018-09-18 17:00:21 -07:00
Pavlo Yatsukhnenko e4c6227c48 Merge pull request #1394 from mkoula/patch-1
There are two big package managers on OS X
2018-09-07 20:49:11 +03:00
Pavlo Yatsukhnenko dcde933167 Issue #1399
Fix printf format warnings
2018-09-05 23:24:13 +03:00
Pavlo Yatsukhnenko 88d05e7d6e Merge pull request #1398 from remicollet/issue-depsession
session is required
2018-09-05 15:31:27 +03:00
Remi Collet 58bd8cc8f5 session is required 2018-09-05 14:14:12 +02:00
Pavlo Yatsukhnenko e206ce9c12 Issue #1388
Set default values for ini entries
2018-09-05 10:30:09 +03:00
Pavlo Yatsukhnenko 908ac4b35e Issue #1388
Display ini entries in output of phpinfo()
2018-09-05 09:55:17 +03:00
Miroslav Koula eaf7e9771e There are two big package managers on OS X
Except for Homebrew (Linux like a clone), there's also package manager MacPorts (FreeBSD like a clone) which is having the package for php-redis
2018-08-29 18:16:04 +02:00
Pavlo Yatsukhnenko 1d99787375 Change connect/reconnect logic
Persistant connections can be closed via close method.
Connection marked as failed only after reconnection attempts.
2018-08-22 09:02:31 +03:00
Pavlo Yatsukhnenko 399edf44f9 Merge pull request #1383 from marcing/develop
Added subsection of PHP Session handler: "Session locking".
2018-08-08 14:57:35 +03:00
mg 842da336d2 Ddded subsection of PHP Session handler: "Session locking". 2018-08-06 16:19:33 +02:00
Pavlo Yatsukhnenko d943a447bf Update package.xml 2018-08-01 09:34:56 +03:00
Pavlo Yatsukhnenko 7171aceaaa Issue #1367
Use `zval_get_long` instead of `Z_STRVAL_P` + `atof` for parsing
timeout and read_timeout params.
2018-07-29 22:57:03 +03:00
Pavlo Yatsukhnenko 0858f0837b Merge pull request #1380 from jrchamp/develop
travis: Use default dist; fix redis-trib.rb error
2018-07-29 22:39:32 +03:00
Pavlo Yatsukhnenko 0c5e7f4df9 Issue #1347
Fix arginfo for set command
2018-07-29 22:33:25 +03:00
Jonathan Champ 9bf32d3044 travis: Use default dist; fix redis-trib.rb error 2018-07-27 09:43:27 -04:00
akihito.nakano c3b023b0a1 Highlight php codes 2018-07-08 09:58:09 -07:00