Commit Graph

895 Commits

Author SHA1 Message Date
michael-grunder
504724b416 Merge branch 'hotfix/bitops_offset' bitops_offset 2013-11-13 15:00:47 -08:00
michael-grunder
eff6a91340 Enforce offset range limitations for GETBIT and SETBIT
Addresses #401
2013-11-13 15:00:13 -08:00
michael-grunder
b3c6616a61 Merge branch 'hotfix/redis_array_pconnect' redis_array_pconnect 2013-11-13 11:53:16 -08:00
Nicolas Van Eenaeme
0fd41c2aef Fixed ra->pconnect parameter in ra_make_array
This parameter was ignored and caused pconnect not to work
2013-11-13 11:46:38 -08:00
michael-grunder
f3191cdc21 Merge branch 'hotfix/srandmember_serialize' srandmember_serialize 2013-11-13 11:23:34 -08:00
michael-grunder
f3f361a427 Fix serializer support for SRANDMEMBER for both one member
and when the count argument is passed.

Addresses #391
2013-11-13 11:16:41 -08:00
michael-grunder
00233a3f91 Merge branch 'hotfix/setex_long_expires'
Incorporate @zined and @s0enke commits to properly handle long timeout
values and not overrun our buffer.

Addresses #385
setex_long_expires
2013-10-04 10:37:45 -07:00
Soenke Ruempler
0f003bcb2d regression test for: setex properly handles long expire values 2013-10-04 10:34:22 -07:00
Deniz Adrian
f3c0dd2b9f let setex properly handle long expire values
adjust the format string passed to redis_cmd_format_static() to
properly handle long int, in order to prevent integer overflows
resulting in negative expire times passed to redis.
2013-10-04 10:34:08 -07:00
michael-grunder
853f86b1f2 Merge branch 'hotfix/close_command' close_command 2013-09-14 11:57:56 -07:00
michael-grunder
4a6c01bc1a Send a newline with the QUIT command
Addresses #381
2013-09-07 13:51:33 -07:00
michael-grunder
0fbf639c3b Merge branch 'hotfix/hmget_invalid_args' hmget_invalid_args 2013-09-05 19:05:59 -07:00
michael-grunder
b144743345 Rework the HMGET command to skip invalid keys
This relates to a previous hotfix for issue #379 where phpredis
would time out if you sent an array of empty values.  The reason
it was timing out is that the argument count being sent wasn't
reflecting any skipped items in the array (meaning redis was
waiting for the rest of the command).

I realized that the previous fix would still fail if you were to
send some valid values, with invalid (null, empty string, etc)
ones mixed in.

Presently, we're just skipping invalid items in the array but there
might be a case to issue a php_error_docref type warning when we
encounter them, so the user can know that it happened.

In addition, HMGET now uses a smart_str to build the command, which
means the time it takes to build the key will scale in a linear fashion
2013-09-05 15:08:30 -07:00
michael-grunder
59a2886d2b Merge branch 'hotfix/hmget_no_valid_keys' 2013-09-03 21:19:23 -07:00
michael-grunder
a0e9b65d4c Add a unit test for the scenario described in #379 2013-09-03 21:17:38 -07:00
michael-grunder
18339ec05b If no valid keys are found when processing an HMGET command,
free up our command and keys pointer and simply return FALSE.

Addresses #379
2013-09-03 21:13:57 -07:00
michael-grunder
19e6f315f2 Merge branch 'release/2.2.4' 2.2.4 2013-09-01 18:39:08 -07:00
michael-grunder
8ed1a29ad3 Merge branch 'develop' of github.com:nicolasff/phpredis into develop 2013-09-01 13:25:15 -07:00
michael-grunder
02bac74dc3 Initialize agg_op_len to zero 2013-09-01 13:24:48 -07:00
Nicolas Favre-Felix
f4960ddec2 Release version 2.2.4 2013-09-01 20:24:09 +01:00
michael-grunder
3923531eba Merge branch 'feature/z_cmd_performance' into develop 2013-09-01 09:38:20 -07:00
michael-grunder
5c4fe08b69 generic_z_command fixes
Use the lengths for our optional parameters, as NULL will
come through as a non null zval pointer with a zero length

Properly return the length from the redis_cmd_sstr_init function
2013-09-01 09:33:20 -07:00
michael-grunder
6e0f0d786c Rework generic_z_command to build the command in linear time
This commit changes how we build the Redis protocol string for
ZUNIONSTORE and ZINTERSTORE such that we avoid reallocating
memory for the command buffer for each new key or weight
2013-09-01 07:48:08 -07:00
michael-grunder
eb0bbbafa0 Rollback the automatic resharding distributor
I accidentally pulled this when getting some of the pull requests
integrated (git flow style) for this release.  I like the idea
for sure, but I think it needs more detailed documentation and
further testing.

At the very least, I need to understand it :)
2013-08-31 19:20:34 -07:00
michael-grunder
f5fc23cbe2 Merge branch 'hotfix/double_precision' into develop 2013-08-31 14:12:56 -07:00
michael-grunder
4c24dfa5c5 Merge branch 'hotfix/double_precision' double_precision 2013-08-31 14:12:36 -07:00
michael-grunder
20a3ef42d8 Merge branch 'feature/mobli_ra_changes' into develop 2013-08-31 14:12:13 -07:00
michael-grunder
60e3ba781e Merge branch 'feature/new_set_args' into develop 2013-08-31 14:09:58 -07:00
michael-grunder
8e81c49b55 Performance increase for MGET
This commit changes the way we construct the MGET command
such that we avoid allocating and reallocating the command
string pointer for every new key that is added.

This means that MGET performance scales in a linear way rather
than exponentially.
2013-08-31 11:27:54 -07:00
michael-grunder
b3a64145cb Merge branch 'feature/matmol_connect_ex' into develop 2013-08-30 21:30:59 -07:00
michael-grunder
77b17e52ea Merge in MatMol's changes so we don't throw and then clear an
exception in the context of connect or pconnect

Addresses #361
2013-08-30 21:30:00 -07:00
michael-grunder
677c8df7c1 Merge remote-tracking branch 'matmol/dont_throw_exception_on_pconnect' into feature/matmol_connect_ex 2013-08-30 21:18:00 -07:00
michael-grunder
bab2a192b7 Fix an erroneous unit test failure for TTL
When using the TTL command, Redis >= 2.8 will return -1 for a key
with no TTL and -2 for a key that doesn't exist.  This fixes the
unit tests so they don't expect this in versions < 2.8.
2013-08-30 21:11:02 -07:00
michael-grunder
7207aae8aa Add SLOWLOG command
Add support for the various slowlog commands you can execute
in Redis, including:

SLOWLOG GET [len]
SLOWLOG RESET
SLOWLOG LIST
2013-08-27 21:26:51 -07:00
michael-grunder
6cf2cea4f6 Merge branch 'feature/reflection_flags' into develop 2013-08-23 11:09:54 -07:00
michael-grunder
d1eddc4b87 Incorporate reflection flags from euskadi31
References #344

Merge remote-tracking branch 'euskadi31/patch-1' into feature/reflection_flags
2013-08-23 11:07:53 -07:00
michael-grunder
535ff5d13f Actually set the precision to 16 places!
Addresses #371
2013-08-15 10:54:41 -07:00
michael-grunder
daef4b73a0 Increase double->string precision
When calling php library methods to convert doubles to strings
we were only keeping 8 digits after the decimal point.  For
double precision numbers, 15 are stable.

Redis uses the C library function strtod() to do the conversion,
which appears to use the first 16 digits for aproximation:
http://www.exploringbinary.com/how-strtod-works-and-sometimes-doesnt/

This hotfix increases the signifigant digits to 16, which I think
is the correct number to pick here.

Addresses issue #371
2013-08-15 10:47:03 -07:00
michael-grunder
c501638696 Merge branch 'feature/zintersection_optional' into develop 2013-08-14 20:20:44 -07:00
michael-grunder
7c9420dcca Merge remote-tracking branch 'mheijkoop/zintersection_optional' into feature/zintersection_optional 2013-08-14 20:18:30 -07:00
Marlies Heijkoop
68605de48c Allow weights array to be null in generic_z_command (zUnion/zInter)
This way we can pass an aggregate function without having to also pass a dummy array(1,1,1..) with weights.
2013-08-12 21:37:16 +02:00
Marlies Heijkoop
d01abbbd7d Added tests for zUnion and zInter with aggregate functions but without weights 2013-08-12 21:36:13 +02:00
michael-grunder
7aae259ecb Fix argument order sent to ra_make_array 2013-08-11 11:50:38 -07:00
michael-grunder
f97c8433d5 Integrating mobli's lazy connect and retry interval 2013-08-11 11:31:23 -07:00
michael-grunder
8443769dc3 Merge remote-tracking branch 'mobli/develop' into feature/mobli_ra_changes
Conflicts:
	redis_array.c
	redis_array_impl.c
	redis_array_impl.h
2013-08-11 11:29:29 -07:00
michael-grunder
a80246122a Merge branch 'feature/ra_mset_intkeys' into develop 2013-08-11 09:13:04 -07:00
michael-grunder
ee571eabdf Merge branch 'feature/ra-performance' into develop 2013-08-11 09:05:37 -07:00
michael-grunder
16185f2e37 Re-add UNIX socket support to RedisArray
Merging the logic from ra-performance branch into feature/ra-performance
2013-08-11 09:01:49 -07:00
michael-grunder
dcbeae7599 Persistent connections with RedisArray
Re-integrating the now old ra-performance branch into a git-flow
branch.  I could have merged it but this was easier with so few
changes
2013-08-11 08:54:59 -07:00
michael-grunder
2099f1904a Merge branch 'hotfix/ra_mget_segfault' into develop 2013-08-06 14:19:37 -07:00