Haruto Otake
749aac72ad
BITCOUNT: fix segmentation fault.
...
remove unsafe and unnecessary cast.
until now, this cast may lead segmentation fault when end > UINT_MAX
setbit foo 0 1
bitcount 0 4294967295
=> ok
bitcount 0 4294967296
=> cause segmentation fault.
Note by @antirez: the commit was modified a bit to also change the
string length type to long, since it's guaranteed to be at max 512 MB in
size, so we can work with the same type across all the code path.
A regression test was also added.
2012-09-05 16:19:04 +02:00
antirez
36741b2c81
Scripting: Force SORT BY constant determinism inside SORT itself.
...
SORT is able to return (faster than when ordering) unordered output if
the "BY" clause is used with a constant value. However we try to play
well with scripting requirements of determinism providing always sorted
outputs when SORT (and other similar commands) are called by Lua
scripts.
However we used the general mechanism in place in scripting in order to
reorder SORT output, that is, if the command has the "S" flag set, the
Lua scripting engine will take an additional step when converting a
multi bulk reply to Lua value, calling a Lua sorting function.
This is suboptimal as we can do it faster inside SORT itself.
This is also broken as issue #545 shows us: basically when SORT is used
with a constant BY, and additionally also GET is used, the Lua scripting
engine was trying to order the output as a flat array, while it was
actually a list of key-value pairs.
What we do know is to recognized if the caller of SORT is the Lua client
(since we can check this using the REDIS_LUA_CLIENT flag). If so, and if
a "don't sort" condition is triggered by the BY option with a constant
string, we force the lexicographical sorting.
This commit fixes this bug and improves the performance, and at the same
time simplifies the implementation. This does not mean I'm smart today,
it means I was stupid when I committed the original implementation ;)
2012-09-05 01:17:49 +02:00
antirez
46c31a150a
Scripting: require at least one argument for redis.call().
...
Redis used to crash with a call like the following:
EVAL "redis.call()" 0
Now the explicit check for at least one argument prevents the problem.
This commit fixes issue #655 .
2012-08-31 10:28:13 +02:00
antirez
84d9ef4f31
Added a new hash fuzzy tester.
...
The new fuzzy tester also removes elements from the hash instead of just
adding random fields. This should increase the probability to find bugs
in the implementations of the hash type internal representations.
2012-06-12 15:21:54 +02:00
antirez
c0de45924c
New test: hash ziplist -> hashtable encoding conversion.
...
A new stress test was added to stress test the code converting a ziplist
into an hash table.
In this commit also randomValue helper function was modified to also
return negative values.
2012-06-11 15:19:46 +02:00
antirez
80e808b6d6
EVAL replication test: less false positives.
...
wait_for_condition is now used instead of the usual "after 1000" (that
is the way to sleep in Tcl). This should avoid to find the replica in
a state where it is loading the RDB in memory, returning -LOADING error.
This test used to fail when running the test over valgrind, due to the
added latencies.
2012-06-02 23:29:57 +02:00
Alex Mitrofanov
51857c7e5c
Fixed RESTORE hash failure (Issue #532 )
...
(additional commit notes by antirez@gmail.com ):
The rdbIsObjectType() macro was not updated when the new RDB object type
of ziplist encoded hashes was added.
As a result RESTORE, that uses rdbLoadObjectType(), failed when a
ziplist encoded hash was loaded.
This does not affected normal RDB loading because in that case we use
the lower-level function rdbLoadType().
The commit also adds a regression test.
2012-06-02 10:24:27 +02:00
antirez
1419406e8d
BITOP bug when called against non existing keys fixed.
...
In the issue #529 an user reported a bug that can be triggered with the
following code:
flushdb
set a
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
bitop or x a b
The bug was introduced with the speed optimization in commit 8bbc076
that specializes every BITOP operation loop up to the minimum length of
the input strings.
However the computation of the minimum length contained an error when a
non existing key was present in the input, after a key that was non zero
length.
This commit fixes the bug and adds a regression test for it.
2012-05-31 21:52:47 +02:00
antirez
bc70b8e5f4
Tests modified to account for INFO fields renaming.
...
Commit 33e1db36fa
modified the name of a
few INFO fields. This commit changes the Redis test to account for this
changes.
2012-05-25 15:20:59 +02:00
antirez
d866803818
BITOP command 10x speed improvement.
...
This commit adds a fast-path to the BITOP that can be used for all the
bytes from 0 to the minimal length of the string, and if there are
at max 16 input keys.
Often the intersected bitmaps are roughly the same size, so this
optimization can provide a 10x speed boost to most real world usages
of the command.
Bytes are processed four full words at a time, in loops specialized
for the specific BITOP sub-command, without the need to check for
length issues with the inputs (since we run this algorithm only as far
as there is data from all the keys at the same time).
The remaining part of the string is intersected in the usual way using
the slow but generic algorith.
It is possible to do better than this with inputs that are not roughly
the same size, sorting the input keys by length, by initializing the
result string in a smarter way, and noticing that the final part of the
output string composed of only data from the longest string does not
need any proecessing since AND, OR and XOR against an empty string does
not alter the output (zero in the first case, and the original string in
the other two cases).
More implementations will be implemented later likely, but this should
be enough to release Redis 2.6-RC4 with bitops merged in.
Note: this commit also adds better testing for BITOP NOT command, that
is currently the faster and hard to optimize further since it just
flips the bits of a single input string.
2012-05-24 15:20:20 +02:00
antirez
fa4a5d5922
BITOP: handle integer encoded objects correctly.
...
A bug in the implementation caused BITOP to crash the server if at least
one one of the source objects was integer encoded.
The new implementation takes an additional array of Redis objects
pointers and calls getDecodedObject() to get a reference to a string
encoded object, and then uses decrRefCount() to release the object.
Tests modified to cover the regression and improve coverage.
2012-05-24 15:20:16 +02:00
antirez
01d3a7e736
Bit operations tests improved.
...
Fuzzing tests of BITCOUNT / BITOP are iterated multiple times.
The new BITCOUNT fuzzing test uses random strings in a wider interval of
lengths including zero-len strings.
2012-05-24 15:20:02 +02:00
antirez
a3f2b4895b
BITOP and BITCOUNT tests.
...
The Redis implementation is tested against Tcl implementations of the
same operation. Both fuzzing and testing of specific aspects of the
commands behavior are performed.
2012-05-24 15:19:48 +02:00
antirez
348ee1a40a
Fixed issue #516 (ZINTERSTORE mixing sets and zsets).
...
Weeks ago trying to fix an harmless GCC warning I introduced a bug in
the ziplist-encoded implementations of sorted sets.
The bug completely broke zuiNext() iterator, that is used in the
ZINTERSTORE and ZUNIONSTORE implementation, so those two commands are no
longer reliable starting from Redis version 2.4.12 and latest 2.6.0-RC
releases.
This commit fixes the problem and adds a regression test.
2012-05-23 11:12:43 +02:00
antirez
92997d06ea
Test "Turning off AOF kills the background writing child if any" is now more reliable.
2012-05-02 11:40:46 +02:00
Harmen
2ac546e00c
Show problem with 'keys' command with specific command sequence.
2012-05-01 10:51:59 +02:00
antirez
5080e625d3
Redis test: scripting EVALSHA replication test more reliable.
...
A new primitive wait_for_condition was introduced in the scripting
engine that makes waiting for events simpler, so that it is simpler to
write tests that are more resistant to timing issues.
2012-04-26 11:16:52 +02:00
antirez
c4a4755286
Ziplist encoding now tested with negative integers as well.
2012-04-23 17:27:46 +02:00
Salvatore Sanfilippo
c22e0eecd5
Merge pull request #461 from schlenk/unstable
...
Replace some unnecessary calls to echo and cat in tests
2012-04-23 02:07:21 -07:00
antirez
4e7cc35f1a
New time limit for protocol desync test set to 30 seconds to reduce false positives.
2012-04-23 10:57:43 +02:00
antirez
d3701d2714
Limit memory used by big SLOWLOG entries.
...
Two limits are added:
1) Up to SLOWLOG_ENTRY_MAX_ARGV arguments are logged.
2) Up to SLOWLOG_ENTRY_MAX_STRING bytes per argument are logged.
3) slowlog-max-len is set to 128 by default (was 1024).
The number of remaining arguments / bytes is logged in the entry
so that the user can understand better the nature of the logged command.
2012-04-21 20:34:45 +02:00
antirez
47db53c3c3
New tests related to scripts max execution time.
2012-04-19 23:49:33 +02:00
antirez
5498e7bc76
Tests for scripting PRNG.
2012-04-18 23:50:16 +02:00
antirez
cddfd67ed4
Test SDIFF with first set empty.
2012-04-18 18:13:31 +02:00
antirez
4264459141
Test SINTER against same integer elements, but different set encoding.
2012-04-18 18:10:48 +02:00
antirez
f800942f64
Test SINTER with non existing key.
2012-04-18 18:05:02 +02:00
antirez
88f77a2b7e
Added an SMOVE test where src and dest key are the same.
2012-04-18 18:00:12 +02:00
antirez
e51a218aaa
New hash fuzzing test.
2012-04-18 17:56:17 +02:00
antirez
79daddd5ba
Explicit RPOP/LPOP tests.
2012-04-18 17:32:48 +02:00
antirez
7aa0dfd014
Test LINSERT syntax error.
2012-04-18 17:22:14 +02:00
antirez
94e5c1d7e5
Test LINDEX out of range index.
2012-04-18 17:17:53 +02:00
antirez
8ec9b03c6b
More robust maxclients test.
2012-04-18 11:34:18 +02:00
Michael Schlenker
875944a23f
Replace unnecessary calls to echo and cat
...
Tcl's exec can send data to stdout itself, no need to call cat/echo for
that usually.
2012-04-17 22:20:54 +02:00
antirez
6a3f0ac68a
Added test for SORT corner case: pattern ending with just "->".
2012-04-17 16:28:59 +02:00
antirez
0705ff3f04
Less false positives in maxclients test, hopefully.
2012-04-17 10:04:42 +02:00
antirez
93a74949d7
Merge branch 'strict.lua' into unstable
2012-04-13 16:16:13 +02:00
antirez
13a21caae3
New test for scripting engine: DECR_IF_GT.
2012-04-13 15:23:32 +02:00
antirez
3cd4ad267c
Tests modified to match the new global protection implementation.
2012-04-13 13:40:57 +02:00
antirez
2fd7c9efde
Tests for lua globals protection.
2012-04-13 11:48:45 +02:00
antirez
a3af8d8e49
Test for maxclients.
2012-04-08 11:16:40 +02:00
antirez
69e7958918
Added new test to check that "CONFIG appendonly no" actually kills the background AOF operation in progress if any.
2012-04-07 13:22:04 +02:00
antirez
4ce22375f4
Tests for MONITOR.
2012-04-07 11:26:24 +02:00
antirez
09f66a0be8
New client info field added to CLIENT LIST output: multi, containing the length of the current pipeline. Test modified accordingly.
2012-04-07 11:14:52 +02:00
antirez
0daf7a2d16
Two new tests for BGREWRTIEAOF.
...
Check for scheduled rewrite if a BGSAVAE is in progress.
Check for error if a rewrite is already in progress.
2012-04-06 23:52:53 +02:00
antirez
15113dcd3d
More MIGRATE tests.
2012-04-03 15:10:51 +02:00
antirez
06e178708e
MIGRATE test modified because the implementation changed.
2012-04-02 16:38:59 +02:00
antirez
ab8232d022
DUMP, RESTORE, MIGRATE tests.
2012-04-02 11:44:25 +02:00
antirez
6aa2f98938
Test for redis.sha1hex().
2012-03-28 20:47:50 +02:00
antirez
6df450b77c
CLIENT LIST test modified to reflect the new output.
2012-03-13 18:06:29 +01:00
antirez
8562798308
Merge conflicts resolved.
2012-03-09 22:07:45 +01:00
antirez
fcdeb98568
even less false positive on obuf-limits test.
2012-02-22 11:25:30 +01:00
antirez
d347348109
Issue #330 regression test.
2012-02-16 16:13:40 +01:00
antirez
c17947287a
Added tests checking ability of the scripting engine to reorder the output of commands with a random output regarding signle elements position in the multi bulk reply.
2012-02-01 17:49:03 +01:00
antirez
44d77bb217
A few SORT tests made more resistant to false negatives resulitng from poor randomization of Redis hash function with one byte inputs.
2012-02-01 17:37:48 +01:00
antirez
01f75bf352
New SORT tests checking the new more deterministic behavior of SORT sorting algorithm.
2012-02-01 17:17:52 +01:00
antirez
de79a2ee12
Make SORT BY <constant> STORE ... to always produce the same output by force sorting, so that we have deterministic replication of this command.
2012-02-01 17:05:45 +01:00
antirez
2c861050c1
SORT is now more deterministic: does not accept to compare by score items that have scores not representing a valid double. Also items with the same score are compared lexycographically. At the same time the scripting side introduced the ability to sort the output of SORT when sort uses the BY <constant> optimization, resulting in no specific ordering. Since in this case the user may use GET, and the result of GET can be null, converted into false as Lua data type, this commit also introduces the ability to sort Lua tables containining false, only if the first (faster) attempt at using just table.sort with a single argument fails.
2012-02-01 15:22:28 +01:00
antirez
fc4ed4299b
minimal change to obuf-limits.tcl test to make sure there are no false positives with 32bit instances as well.
2012-01-30 21:08:10 +01:00
Michal Kwiatkowski
a0bf8d0ad8
SORT with STORE removes key if result is empty. This fixes issue #227 .
2012-01-30 07:36:49 +01:00
antirez
6c29410117
false positive in expire tests mitigated with a sleep, but other solutions exist if needed later.
2012-01-26 16:45:08 +01:00
antirez
7f7a13b27b
Less false positives for obuf-limits.tcl tests
2012-01-26 16:08:24 +01:00
antirez
da9c4cc147
Added test for client output buffer limit (soft limit).
2012-01-25 18:34:56 +01:00
antirez
efc8f6c1a2
Added test for client output buffer limit (hard limit).
2012-01-25 18:11:04 +01:00
antirez
3c0602ff41
CLIENT LIST test fixed (there is a new omem field in the output)
2012-01-23 16:19:49 +01:00
antirez
06f8a473fc
Regression tests for protocol desync bug related to Issue #141
2012-01-06 12:54:29 +01:00
Pieter Noordhuis
ebd85e9a45
Encode small hashes with a ziplist
2012-01-02 22:14:10 -08:00
antirez
9678c37577
Added regression test for ZUNIONSTORE creating NaN (github issue #264 )
2011-12-23 09:34:06 +01:00
antirez
d334281c80
Merge remote-tracking branch 'origin/unstable' into unstable
2011-12-21 17:13:31 +01:00
antirez
b4fb720b10
A test modified to pass with the new AOF start/stop semantics.
2011-12-21 09:24:14 +01:00
BigCat
f54c299091
I found that no test will fail even if I broke the SORT x LIMIT y z
code.
...
Added a naive unit test for SORT-LIMIT command.
2011-12-19 19:49:34 +08:00
antirez
3ae5a308db
unit/introspection.tcl added
2011-12-19 10:21:50 +01:00
antirez
570bbcf8e0
Added tests for AOF rewrite.
2011-12-13 11:10:36 +01:00
antirez
85b69afede
EXPIRE tests more tolerant to random latency while the test is running.
2011-12-07 12:44:27 +01:00
antirez
237194b760
Fixed SORT bugs (issue #224 ) with regression tests.
2011-12-01 16:08:05 +01:00
antirez
674df1eef5
Added regression tests for issue #209
2011-11-25 12:27:29 +01:00
antirez
bf758397a1
more valgrind (and other archs) friendly testing of floating number related features.
2011-11-16 14:40:50 +01:00
antirez
cd4aba36cd
valgrind handles floating point numbers differently for some reason, so using "simpler" numbers to make tests happy.
2011-11-16 13:35:22 +01:00
antirez
3c5680ed9d
HINCRBYFLOAT tests
2011-11-15 15:26:10 +01:00
antirez
d4a3cfed9c
Merge branch 'unstable' into incrbyfloat
2011-11-14 15:59:56 +01:00
antirez
70023978fd
test for the new more strict behavior about number parsing
2011-11-14 15:39:55 +01:00
antirez
c9df799b2c
INCRBYFLOAT tests
2011-11-14 15:37:13 +01:00
antirez
d93f9a8644
string to number API is now more strict not accepting spaces before or after the number. A few tests converted to match the new error messages using the word float instead of double.
2011-11-14 15:34:44 +01:00
antirez
762eea07ca
Added test to make sure Redis evicts expired keys actively (and not just in a lazy fashion).
2011-11-12 11:27:38 +01:00
antirez
64c7499eb8
new tests for EXPIRE family functions, new millisecond precision, and new millisecond argument variants.
2011-11-11 15:11:50 +01:00
antirez
ef23f3ac92
Script max execution time test disabled for now since it is no longer enforced.
2011-10-31 16:09:07 +01:00
antirez
e5abf6ef19
SCRIPT LOAD now returns the SHA1 instead of +OK
2011-10-25 14:46:15 +02:00
antirez
e8c993f0fb
Fixes for the scripting refactoring and new commands. Tests for the new features.
2011-10-25 11:19:15 +02:00
antirez
9ed32ba083
Redis.call is now split into two variants of the same function. Redis.call will raise an error by default. Redis.pcall will return the error object instead.
2011-10-20 16:02:23 +02:00
antirez
ab52d1f4a8
Fix for issue #132 . Now AUTH raises an error if no server password is configured.
2011-10-10 22:21:17 +02:00
antirez
02a3e58258
Added two new tests for RENAME, currently both will fail because of bug #128 .
2011-10-10 12:01:13 +02:00
antirez
7864ef8551
new tests for the scripting engine: not allowed commands and write commands after random commands.
2011-09-27 15:39:41 +02:00
antirez
7551e23716
regression test for bug 593 added
2011-09-12 10:53:49 +02:00
antirez
f65c8f654f
Merge remote-tracking branch 'origin/unstable' into unstable
2011-07-28 14:40:47 +02:00
antirez
4bb1ccc6eb
Regression for a crash with blocking ops and pipelining
2011-07-28 14:40:06 +02:00
antirez
3d9704d335
Merge remote branch 'origin/unstable' into unstable
2011-07-28 12:33:17 +02:00
antirez
243b783fdc
Maxmemory test
2011-07-28 12:32:52 +02:00
Pieter Noordhuis
2d7162bb1d
HDEL: Abort deleting fields when hash is removed
2011-07-27 12:29:40 +02:00
antirez
d50292d2cc
make a scripting test more valgrind friendly
2011-07-15 18:28:24 +02:00
antirez
61fee31999
test that EVALSHA is replicated as EVAL
2011-07-15 17:41:40 +02:00
antirez
0681c5ad84
master branch merged into scripting.
2011-07-12 12:39:16 +02:00
antirez
34a8b51768
solved a slow positive in the slow log test when the test is executed slowly
2011-07-11 16:04:18 +02:00
antirez
bf1379c8df
fixed another timing issue when running the test over valgrind or with very slow PCs
2011-07-11 15:58:31 +02:00
antirez
0717e3aa16
fix a test timing issue when running the test over valgrind
2011-07-11 15:44:38 +02:00
antirez
121ffc85f4
better recap of failed tests.
2011-07-11 12:56:00 +02:00
antirez
04e2410d2d
initial support for failed tests summary at end of the test.
2011-07-11 12:44:55 +02:00
antirez
30cf7be60c
the test runs less iterations of slow tests if no --accurate is given.
2011-07-11 12:15:35 +02:00
antirez
6209797d37
list test further split into smaller units
2011-07-11 11:41:23 +02:00
antirez
e46f78bd26
list test split into smaller parts
2011-07-11 11:30:46 +02:00
antirez
13566085cf
Initial implementation of a client-server parallel testing system for Redis in order to speedup execution of the test suite.
2011-07-10 23:25:48 +02:00
antirez
bbbf79ddb5
Added slowlog.tcl
2011-07-01 15:49:17 +02:00
antirez
994ed2bc55
unstable merge conflicts resolved
2011-06-25 12:29:24 +02:00
antirez
c1c9d551da
Fix for bug 561 and other related problems
2011-06-20 17:19:36 +02:00
Pieter Noordhuis
b0d1d2684d
SETNX regression tests.
2011-06-20 16:42:29 +02:00
antirez
0d1650f8a9
Updated to unstable
2011-06-14 18:06:39 +02:00
antirez
b002546bb4
ZREM tests
2011-05-31 20:30:54 +02:00
antirez
3738ff5f32
Fix for the variadic version of SREM. Regression test added.
2011-05-31 20:14:29 +02:00
antirez
faa2a80f89
disabled development test entry, tests moved in the right place
2011-05-31 18:49:12 +02:00
antirez
449286a588
Scripting tests added
2011-05-25 12:32:50 +02:00
antirez
6326c3ce73
Merge branch 'unstable' of github.com:antirez/redis into unstable
2011-05-20 11:45:05 +02:00
antirez
206d62710c
Print version info before running the test
2011-05-20 11:44:54 +02:00
antirez
521ddcce14
Fix for ZUNIONSTORE bug when there is an empty set among input sets. Regression test added.
2011-05-19 17:58:52 +02:00
antirez
af9aed25e4
ZINTERSTORE regressiont test with two sets, intset+hashtable
2011-05-12 20:20:40 +02:00
antirez
b3a96d454e
Variadic SREM
2011-04-19 17:37:03 +02:00
antirez
64a13a36e6
variadic HDEL with tests
2011-04-19 17:07:55 +02:00
antirez
271f087842
Variadic SADD tests
2011-04-15 18:28:25 +02:00
antirez
9d0a8656c1
tests for variadic list push
2011-04-15 16:52:07 +02:00
Pieter Noordhuis
100ed062c0
Test for ENCODING_SKIPLIST instead of ENCODING_RAW
2011-04-06 16:17:07 +02:00
Pieter Noordhuis
04a10b1a6d
Test that sorted sets are removed when empty
2011-03-22 09:28:45 +01:00
Pieter Noordhuis
9ec4ea20a7
Test both sorted set encodings for every test
2011-03-14 10:54:37 +01:00
Pieter Noordhuis
e53ca04b50
Test for empty inner range when looking for elements in range
2011-03-11 18:18:02 +01:00
Pieter Noordhuis
8e1b327706
Test for ranges where min > max
2011-03-08 10:57:39 +01:00
Pieter Noordhuis
22b9bf1594
Move logic concerned with zset ranges
...
This also optimizes ZREVRANGEBYSCORE for pathological cases where a
sorted set contains many elements with the same score. Previously,
it would traverse the list from back to front in such a case.
2011-03-08 10:57:24 +01:00
Pieter Noordhuis
6c682e559c
Restore argc/argv in EXEC after command is executed
2011-02-23 14:37:22 +01:00
antirez
322ea972fe
run both inmemory and diskstore tests.
2011-01-09 19:42:56 +01:00
antirez
a5062bbab0
fixed bgsave_in_progress in INFO when BGSAVEing with diskstore enabled, don't DEBUG FLUSHCACHE when bgsave is in progress.
2011-01-09 19:25:34 +01:00
antirez
69bfffb4a7
test adapted to run with diskstore, and a few bugs fixed
2011-01-09 18:25:34 +01:00
Pieter Noordhuis
7d5f5712d9
Update tests for STRLEN
2010-12-15 11:49:39 +01:00
Pieter Noordhuis
8f8eeffec1
Disable negative offsets for SETRANGE
2010-12-15 11:30:50 +01:00
Pieter Noordhuis
e983cf34be
Add fuzzy test for SETBIT
2010-12-15 11:20:54 +01:00
Pieter Noordhuis
30407e1f4f
Make SETBIT return original bit value
2010-12-15 00:42:32 +01:00
antirez
603e616bf4
Merge branch 'master' of github.com:antirez/redis
2010-12-14 17:42:46 +01:00
antirez
57997664ea
Merge remote branch 'pietern/strrange'
2010-12-14 17:42:01 +01:00
antirez
f858c11d7d
Merge remote branch 'pietern/brpoplpush'
2010-12-14 16:26:37 +01:00
Pieter Noordhuis
d8f160a848
Add test cases for GETRANGE against integer-encoded strings
2010-12-14 15:35:35 +01:00
Pieter Noordhuis
ef11bcccca
Refactor and rename SUBSTR to GETRANGE
...
SUBSTR is renamed to GETRANGE to have better consistency between command
names (with SETRANGE as its dual). GETRANGE is still aliased as SUBSTR.
2010-12-14 15:16:29 +01:00
Pieter Noordhuis
9f9e1ceaa0
Add SETRANGE command implementation and tests
2010-12-14 14:20:51 +01:00
Pieter Noordhuis
6f8a32d5c7
Be less verbose in testing; improve error handling
2010-12-10 16:13:21 +01:00
Pieter Noordhuis
eae33c1c81
Add generic function to grow an sds value
...
Move logic concerned with setting a bit in an sds to the SETBIT command
instead of keeping it in sds.c. The function to grow an sds can and will
be reused for a command to set a range within a string value.
2010-12-10 11:58:21 +01:00
Pieter Noordhuis
076f88d657
Enforce maximum string value length of 512MB
2010-12-09 17:16:10 +01:00
Pieter Noordhuis
3c1bf4957e
Add commands SETBIT/GETBIT
2010-12-09 16:39:33 +01:00
Pieter Noordhuis
ecf9401415
Fix case and indent
2010-12-06 16:04:42 +01:00
Pieter Noordhuis
8a88c368ed
Check other blocked clients when value could not be pushed
2010-12-06 16:04:10 +01:00
Michel Martens & Damian Janowski
baa14ef913
Fix BRPOPLPUSH behavior for all use cases.
2010-11-29 23:52:07 -03:00
Damian Janowski & Michel Martens
7c25a43adc
Handle BRPOPLPUSH inside a transaction.
2010-11-29 23:52:07 -03:00
Damian Janowski & Michel Martens
ba3b474111
Refactor code for BRPOPLPUSH.
2010-11-29 23:52:07 -03:00
Damian Janowski & Michel Martens
b2a7fd0cf7
BRPOPLPUSH.
2010-11-29 23:52:07 -03:00
antirez
21dbc6499a
merge conflict resolved
2010-10-28 22:59:47 +02:00
antirez
73abd0a9d2
Merge remote branch 'remotes/pietern/zrevrangebyscore'
2010-10-28 14:12:25 +02:00
Pieter Noordhuis
e584d82fec
Return error to client on wrong type for HMGET
2010-10-26 12:33:17 +02:00
Pieter Noordhuis
b19c33d48a
Prevent clients from making too large multibulk requests
2010-10-15 19:15:38 +02:00
Pieter Noordhuis
dc11daf3b5
Change tests to use either the inline or the multibulk protocol
2010-10-15 17:25:20 +02:00
Pieter Noordhuis
5a4f9f27e7
Add tests for OK on QUIT
2010-10-15 12:54:53 +02:00
Pieter Noordhuis
7236fdb22f
Return error when min and/or max in the sorted set range spec is not a double
2010-10-13 21:59:24 +02:00
Pieter Noordhuis
91504b6cbe
Make ZREMRANGEBYSCORE accept the same range spec as ZRANGEBYSCORE
...
This allows to use inclusive/exclusive bounds for min and max when
deleting a range of scores from a sorted set.
2010-10-13 21:43:58 +02:00
Pieter Noordhuis
26f3388d27
Merge branch 'master' into zrevrangebyscore
2010-10-13 20:29:50 +02:00
antirez
4610b0332c
intset stress testing added, ziplist stress testing relocated in a more appropriate place
2010-09-24 11:15:06 +02:00
antirez
ef27ba988b
explicit regression test for a ziplist bug added
2010-09-24 10:37:00 +02:00
antirez
1a06bf93c4
ziplist implementation fuzzy tests
2010-09-24 10:30:15 +02:00
Pieter Noordhuis
25bb8a4452
Add ZREVRANGEBYSCORE and refactor Z*RANGEBYSCORE
2010-09-16 14:38:07 +02:00
Pieter Noordhuis
3c23ee1ba2
Fix another test that sometimes returned the swapped object instead of encoding
2010-09-13 16:59:46 +02:00
Pieter Noordhuis
efc5d4cc0d
Fix test that sometimes returned the swapped object instead of encoding
2010-09-07 11:49:33 +02:00
antirez
f7f12a606c
resolved conflict merging pietern/bpop-timeout
2010-08-31 11:23:12 +02:00
antirez
08f55b786b
faster server starting in Redis tests
2010-08-31 11:17:06 +02:00
Pieter Noordhuis
1eb13e4913
Fix set tests to make sets have a deterministic encoding
2010-08-31 09:37:35 +02:00
antirez
fb92ecece7
BLPOP inside MULTI/EXEC block no longer crashes, instead if the list is empty the behavior is like if the timeout is reached. This fixes Issue 285
2010-08-30 16:31:03 +02:00
antirez
452ccf7a41
SORT stress testing against bigger aggregate values
2010-08-26 17:29:13 +02:00
Pieter Noordhuis
94364d53b4
Verify that the blocking pop timeout value is a non-negative integer
2010-08-26 14:05:14 +02:00
antirez
acc75bfd4f
Merge remote branch 'pietern/intset-split'
2010-08-26 12:04:24 +02:00
antirez
01daeecee7
added tests for invalid bulk argument
2010-08-24 11:49:05 +02:00
Pieter Noordhuis
029e5577ff
Make SORT use the hybrid set accessors to allow sorting intsets
2010-08-21 11:20:41 +02:00
Pieter Noordhuis
2b9a59471f
SORT tests with hash table encoded set as input
2010-08-21 11:03:56 +02:00
Pieter Noordhuis
ced6709cb9
Make SORT tests use both ziplists and linked lists as input
2010-08-21 11:02:22 +02:00
Pieter Noordhuis
5d4f3a8c85
Move SORT tests around
2010-08-21 10:55:53 +02:00
Pieter Noordhuis
87c74dfaa8
Check if stroll return value was clamped
2010-08-20 13:42:42 +02:00
Pieter Noordhuis
aaada3f962
Merge branch 'master' into intset-split
...
Conflicts:
src/Makefile
src/t_set.c
2010-08-20 12:40:55 +02:00
antirez
1fb4e8def7
PERSIST: a fix and some basic test
2010-08-03 14:25:22 +02:00
antirez
2c572622fb
no longer passing tests due to the new write-on-volatile semantics modified/removed
2010-08-03 13:08:32 +02:00
antirez
0c7a9dec65
Merge remote branch 'pietern/list-test'
2010-07-31 13:55:06 +02:00
Pieter Noordhuis
673e1fb7e4
Change getDoubleFromObject to fail on NaN.
...
Return an error when the resulting value is not a number (NaN). Fix
ZUNIONSTORE/ZINTERSTORE to clean up when a weight argument is not a
double value.
2010-07-29 23:05:01 +02:00
Pieter Noordhuis
d9e28bcf00
Fix ZUNIONSTORE/ZINTERSTORE to never store a NaN score.
...
When +inf and -inf are added, the result is NaN. We don't want NaN
scores in a sorted set, so agreed on the result of this operation being
zero.
2010-07-29 23:03:11 +02:00
Pieter Noordhuis
715c801a07
Use a large value to consistently trigger a list encoding,
...
even when the list is swapped out and in again.
2010-07-29 13:56:35 +02:00
antirez
db0c43a70c
removed test code having bad effects...
2010-07-27 14:46:39 +02:00
antirez
dd3f505ff5
Consistency test improved
2010-07-27 14:42:11 +02:00
antirez
80091bbaac
STRLEN command implemented
2010-07-27 10:09:26 +02:00
antirez
b7a8daef60
WATCH will now consider touched keys target of EXPIRE command after the WATCH is performed, but not before
2010-07-05 19:38:12 +02:00
Pieter Noordhuis
96ffb2fe97
merged intset code into the split files
2010-07-02 19:57:12 +02:00
antirez
b8b8501d70
Merge remote branch 'pietern/zfixes'
2010-06-25 00:23:38 +02:00
Pieter Noordhuis
f483ce5ffe
fix unexpected behavior on an out of range end index for LRANGE and LTRIM
2010-06-24 15:12:42 -07:00
Pieter Noordhuis
c2ff0e90b8
more pub/sub tests
2010-06-16 11:03:23 +02:00
Pieter Noordhuis
4589a823fd
initial basic pub/sub tests
2010-06-16 11:01:42 +02:00