952 Commits

Author SHA1 Message Date
michael-grunder
9acd3760ee Merge branch 'hotfix/tsrmls_cc-again' 2.2.5 2014-03-17 07:41:27 -07:00
michael-grunder
d4b5631b81 TSRMLS_DC, not TSRMLS_CC in definition
Addresses #444
2014-03-17 07:40:42 -07:00
michael-grunder
fd55a62c7b Merge branch 'hotfix/2.2.5-pecl' 2014-03-15 10:44:54 -07:00
michael-grunder
94c369cfb6 Incorporate PECL and rpm changes to reflect 2.2.5 2014-03-15 10:41:14 -07:00
michael-grunder
a4edb02298 Merge branch 'release/2.2.5' 2014-03-15 10:21:15 -07:00
michael-grunder
1d47fc8813 Bump! 2014-03-15 10:20:55 -07:00
michael-grunder
6c37fa301d Merge branch 'feature/pubsub_cmd' into develop 2014-03-15 10:14:41 -07:00
michael-grunder
c81a95413d Merge branch 'hotfix/ra_autorehash' into develop
Conflicts:
	redis_array.c
2014-03-11 09:14:26 -07:00
michael-grunder
b9460ccbba Merge branch 'hotfix/ra_autorehash' ra_autorehash 2014-03-11 09:12:51 -07:00
michael-grunder
f72a3177a3 Fix autorehashing in RedisArray
This commit fixes auto rehashing in RedisArray as well as fixes
a couple of memory leaks found along the way

Addresses #442 and #294
2014-03-10 13:18:19 -07:00
michael-grunder
6194d45dcc Merge branch 'hotfix/ra_type_check' into develop 2014-03-09 11:06:58 -07:00
michael-grunder
d2cb145099 Merge branch 'hotfix/ra_type_check' ra_type_check 2014-03-09 11:06:46 -07:00
michael-grunder
0bf1971951 Data type check on redis array host info
RedisArray will segfault if you pass something other than strings
into your array of hosts.  This is invalid input (needs strings here)
but it shouldn't crash php.
2014-03-09 11:05:45 -07:00
michael-grunder
e74ffe0366 Implemented BITPOS command
This commit introduces the new BITPOS redis command
http://redis.io/commands/bitpos
2014-03-03 06:23:38 -08:00
michael-grunder
8f006cba2d Properly fix TRMLS_CC references :) 2014-02-26 06:59:11 -08:00
michael-grunder
e4d907c76a Pass TSRMLS_CC macro 2014-02-25 05:57:54 -08:00
michael-grunder
d2bb49f5c0 Addreses #347
Merge branch 'feature/ra_connect_timeout' into develop
2014-02-23 14:47:39 -08:00
michael-grunder
893c15af67 Cleanup merge 2014-02-23 12:24:16 -08:00
Mike
e3403e9588 fix for parsing ini value from string (atol should have been atof) 2014-02-23 11:51:14 -08:00
Mike
6f5e47cec3 add support for 'connect_timeout' option for redis arrays
Conflicts:
	redis_array.c
	redis_array_impl.c
	redis_array_impl.h
2014-02-23 11:50:34 -08:00
michael-grunder
2e2a84a99e Merge branch 'hotfix/mget_skip_empty' into develop 2014-02-21 07:40:43 -08:00
michael-grunder
2552b29aca Merge branch 'hotfix/mget_skip_empty' mget_skip_empty 2014-02-21 07:40:10 -08:00
michael-grunder
9eaf14756b Don't attempt MGET on nodes where no keys resolve
The MGET call in RedisArray was failing under circumstances where
none of the passed keys hashed into any given node in the ring.
What was happening is that RedisArray was passing through to the
phpredis MGET command an empty array, which was returning false.
This in turn caused RedisArray to abort the process and return
false as well.

This change updates RedisArray MGET such that if a given node
doesn't have any keys, we skip the call to it all together.

Addresses #435
Addresses #436
2014-02-21 06:12:32 -08:00
michael-grunder
79ccf9aec4 Merge branch 'hotfix/eval_timeout_segfault' into develop 2014-02-20 22:26:23 -08:00
michael-grunder
43b35a4737 Merge branch 'hotfix/eval_timeout_segfault' eval_timeout_segfault 2014-02-20 22:26:00 -08:00
michael-grunder
d2832bfa85 We need to return immediately from our variant reply parsing
function if we get a protocol error, rather than just throwing
and exception and breaking execution of the loop.

Addresses #437
2014-02-20 15:48:15 -08:00
michael-grunder
f200730fe9 _serialize method
This commit adds a utility method as a counterpart to the _unserialize
utility method, allowing users to manually serialize data themselves
before sending it to Redis.  This could be useful for calls going through
EVAL, as phpredis can't automatically serialize/unserialize in that case.

Addresses #431
2014-02-04 11:55:08 -08:00
michael-grunder
48ae8e52f6 Implement PUBSUB command
This commit implements the Redis PUBSUB command, a new command
available since Redis 2.8.0 and described here:
http://redis.io/commands/pubsub

Addresses #427
2014-01-21 14:50:34 -08:00
michael-grunder
1a89ec2ff4 Add Redis COPY and REPLACE flag support for Migrate command.
Addresses #426
2014-01-14 13:43:06 -08:00
michael-grunder
589072a649 Merge branch 'hotfix/incrbyfloat_docfix' into develop 2014-01-06 09:35:47 -08:00
michael-grunder
92782639b0 Merge branch 'hotfix/incrbyfloat_docfix' incrbyfloat_docfix 2014-01-06 09:35:16 -08:00
liaolliso2012
f92b74ba35 Update README.markdown
incrByFloat function in example returns wrong value
2014-01-06 09:34:53 -08:00
Mithun Satheesh
727b824924 Update README.markdown
fixed syntax error in set examples.
2014-01-04 12:32:28 -08:00
Mithun Satheesh
3f0dcd8692 Update README.markdown
fixed syntax error in set examples.
2013-12-31 09:22:00 -08:00
Mathias Verraes
8732d89be9 added homebrew installation instructions 2013-12-23 08:32:27 -08:00
Nicolas Favre-Felix
a77439a7cf Minor documentation fixes 2013-12-14 21:00:06 +00:00
michael-grunder
f39faf7dac Don't forget to prefix our keys. :) 2013-12-14 12:23:23 -08:00
michael-grunder
53560e0332 Merge branch 'feature/scan_commands' into develop 2013-12-14 11:17:13 -08:00
michael-grunder
84f3fb50b5 Another documentation fix :) 2013-12-14 11:01:51 -08:00
michael-grunder
2e4ff5711c Documentation fix 2013-12-14 11:00:37 -08:00
michael-grunder
ab553893f9 SCAN and variants
This commit introduces support for the Redis SCAN, HSCAN, SSCAN,
and ZSCAN commands.

In the case of HSCAN, SSCAN, and ZSCAN, we take a key and iterator
as required arguments, and for SCAN just an iterator.  Matching
the Redis commands, each variant can optionally take a pattern
to match against and a count value which hints at Redis how many
keys to return at a time.

When scanning keys or members (especially with a large keyspace when
searching for a pattern), Redis will sometimes return an empty result
of keys/members.  PHPRedis can be set up to abstract this from the
caller by setting:

$redis->setOption(Redis::OPT_SCAN, Redis::SCAN_RETRY);

Which instructs PHPRedis to keep retrying the scan until members are
returned OR the iteration completes (Redis returns to us a zero iterator).

By default this option is set to Redis::SCAN_NORETRY, meaning that
empty results are possible, requiring an explicit check for FALSE in the
scanning loop, like so:

```php
$it = NULL;
while(($arr_keys = $redis->scan($it, "*pattern*"))!==FALSE) {
	print_r($arr_keys);
}
```
2013-12-14 10:51:03 -08:00
michael-grunder
77afbe3dac Implement WAIT command
This commit implements the new WAIT command which currently lives
in redis unstable, along with a unit test.

Also added myself to the README.markdown file, as well as a link to
"the twitter".
2013-12-07 14:08:18 -08:00
michael-grunder
014b905ac5 Merge branch 'hotfix/incrby_float_prefix' into develop
Fixes #408
2013-11-19 07:41:02 -08:00
michael-grunder
e482f970ac Merge branch 'hotfix/incrby_float_prefix'
Fixes #408
incrby_float_prefix
2013-11-19 07:40:30 -08:00
michael-grunder
2108446ecb Don't free the key before we use it
Fixes #408
2013-11-19 07:40:02 -08:00
michael-grunder
11a9292d96 Merge branch 'hotfix/allow_null_set_options' into develop 2013-11-18 11:42:27 -08:00
michael-grunder
49dce3b372 Merge branch 'hotfix/allow_null_set_options' allow_null_set_options 2013-11-18 11:42:14 -08:00
michael-grunder
32837e06e9 Allow for NULL to be passed in our optional arguments and just
ignore it if it is (but still set the key).

Addresses #407
2013-11-18 11:41:19 -08:00
michael-grunder
f73898de48 Merge branch 'hotfix/bitops_offset' into develop 2013-11-13 15:00:58 -08:00
michael-grunder
504724b416 Merge branch 'hotfix/bitops_offset' bitops_offset 2013-11-13 15:00:47 -08:00