New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
ALL simple issue fixes #1906
ALL simple issue fixes #1906
Commits on Aug 1, 2014
-
redis-cli: Re-attach selected DB after auth
Previously, if you did SELECT then AUTH, redis-cli would show your SELECT'd db even though it didn't happen. Note: running into this situation is a (hopefully) very limited used case of people using multiple DBs and AUTH all at the same time. Fixes antirez#1639
-
redis-cli: stop showing incorrectly selected DB
Previously redis-cli would happily show "-1" or "99999" as valid DB choices. Now, if the SELECT call returned an error, we don't update the DB number in the CLI. Inspired by @anupshendkar in redis#1313 Fixes redis#566, redis#1313
-
redis-cli: Add --no-raw option
Some people need formatted output even when they have no interactive tty. Fixes redis#760
Commits on Aug 2, 2014
-
We only want to use the last STORE key, but we have to record we actually found a STORE key so we can increment the final return key count. Test added to prevent further regression. Closes redis#1883, redis#1645, redis#1647
-
Handle large getrange requests
Previously the end was casted to a smaller type which resulted in a wrong check and failed with values larger than handled by unsigned. Closes redis#1847, redis#1844
-
scripting: no eval with negative key count
Negative key count causes segfault in Lua functions. Fixes redis#1842 Closes redis#1843
-
cluster: fix node connection memory leak
Cluster leaks memory while connecting due to missing freeaddrinfo() Closes redis#1801
-
redis-cli: fix latency result output
(Cleaned up a little by @mattsta) Closes redis#1774
-
The classic (min+max)/2 is provably unsafe. Fixed as recommended in research: http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html Fix inspired by @wjin, but I used a different approach. (later, I found @kuebler fixed the same issue too). Fixes redis#1741, redis#1602
-
install_server.sh: add missing bang
This was discovered by _bodya and reported in the IRC channel. Everything worked fine as these scripts are always executed as shell scripts. Closes redis#1728
-
Fix assert technical correctness
dictAdd returns DICT_OK, not REDIS_OK. They both have the same underlying values, so it works even though the code is technically wrong. Fixes redis#1512
-
Change unixsocketperm comment to 700 from 755
According to unix manuals, "Connecting to the socket object requires read/write permission." -- mode 755 is useless for anybody other than the owner. Fixes redis#1696
-
redis-check-dump: use names instead of magic nums
Use constants to avoid magic numbers in `types`, which is an array that stores the names of `REDIS` types. Closes redis#1681
-
-
Factor out duplicate signal handling code
No options are set for SIGTERM, so we can use the simpler signal handling interface and remove unnecessary structure initilization. sigemptyset() is moved outside of the ifdef to prevent any potential unused variable warning. Closes redis#1637
-
Use 'void' for zero-argument functions
According to the C standard, it is desirable to give the type 'void' to functions have no argument. Closes redis#1631
-
scripting: Add error handler only when needed
Cleans up the flow of code to read much easier too. Closes redis#1615
-
pubsub: Return integers for NUMSUB, not strings
Also adds test for numsub 鈥斅燿ue to tcl being tcl, it doesn't capture the "numberness" of the fix, but now we at least have one test case for numsub. Closes redis#1561
-
Avoid slave loading RDB on startup
The replica instance will immediately sync with a master anyway, so we don't need to load anything from disk. If we add support for PSYNC after instance restart, we will need different logic here anyway. Closes redis#1543
-
Improve accuracy of HAVE_ATOMIC dependency check
[I had to split out the clang check due to clang *really* not liking the __GLIBC_PREREQ macro; -matt] Closes redis#1456
-
Reject MOVE to non-integer DBs
Previously, "MOVE key somestring" would move the key to DB 0 which is just unexpected and wrong. String as DB == error. Test added too. Fixes redis#1428
-
We only need to allocate memory for key positions, not for every argument position. The most keys we can have is total arguments / keystep. Closes redis#1300
-
redis-check-dump: Prevent segfault if can't malloc
Found by The Mayhem Team (Alexandre Rebert, Thanassis Avgerinos, Sang Kil Cha, David Brumley, Manuel Egele) Cylab, Carnegie Mellon University. See http://bugs.debian.org/716259 for more. Signed-off-by: Chris Lamb <lamby@debian.org> Fixes redis#1191
-
Remove duplicate prototypes in redis.h
Also moves acceptHandler() to be near the other accept...() functions. Closes redis#1105
-
For some Solaris flavours, the inet_aton in in resolv library. Not linking this library will introduce link error. Improves compatability with older Solaris and still works on new Solaris. Closes redis#1092
-
va_copy must be matched by va_end
Hat tip to @rfuchs. See: redis/hiredis#178. Fixes redis#1187
-
Use unsigned length in sds header
People have reported redis-cli segfaults because of large sds allocations. [Additional fixes by matt: - add the unsigned storage class to sds in hiredis - convert sdsIncrLen from int to long so assert works] All tests pass. Fixes redis#1188
-
Refactor cluster flag printing
Less copy/paste code duplication. Closes redis#952
-
-
Extend range of bytesToHuman to TB and PB
Also adds a fallthrough case for when given large values (like overflow numbers of 2^64 by mistake). Closes redis#858
-
redis-cli: fix prompt after shutdown command
Fix redis-cli prompt to state "not connected" after a SHUTDOWN command is sent.
-
-
Support cross-compiling for uClibc targets
Disable backtrace support in src/config.h if uClibc is detected. Tested on the following platforms: - sh4-linux-uclibc (GCC 4.1.1, uClibc 0.9.29) - mipsel-linux-uclibc (GCC 4.4.5, uClibc 0.9.29) To cross-compile: $ make CC=mipsel-linux-gcc MALLOC=libc Signed-off-by: Michael Steinert <mike.steinert@gmail.com> Closes redis#537
-
Clarify argument to dict macro
d is more clear because the type of argument is dict not dictht Closes redis#513
-
Create PID file even if in foreground
Previously, Redis only wrote the pid file if it was daemonizing, but many times it's useful to have the pid written out even if you're in the foreground. Some background for this is: I usually run redis via daemontools. That entails running redis-server on the foreground. Given that, I'd also want redis-server to create a pidfile so other processes (e.g. nagios) can run checks for that. Closes redis#463
-
It has an important name, but nothing uses it...
-
Fix memory leak in cluster config parsing
The continue stop us from triggering the free after the long line for loop, so add it earlier.
-
Cluster: Fix segfault if cluster config corrupt
This commit adds a size check after initial config line parsing to make sure we have *at least* 8 arguments per line. Also, instead of asserting for cluster->myself, we just test and error out normally (since the error does a hard exit anyway). Closes redis#1597
Commits on Aug 4, 2014
-
Sentinel: Reject config from STDIN
Sentinel needs to die with a more accurate error message when attempted to open a config from STDIN. See: https://groups.google.com/forum/#!topic/redis-db/sYx7VNMWaNM
Commits on Aug 5, 2014
-
Stop tests from leaving a black background
Uses ANSI "default background" color code after closing tests so any non-black terminals don't remain polluted. Fixes redis#1649 Closes redis#1912
-
Use correct github url to find commands.json
Once this is merged: - merge the latest changes to commands.json in antirez/redis-doc - re-run: utils/generate-command-help.rb > src/help.h Then we'll have nice and easy tab-completed help in redis-cli again. Closes redis#1909
Commits on Aug 6, 2014
-
Rename two 'buf' vars to 'ip' for better clarity
Clearly ip[32] is wrong, but it's less clear that buf[32] was wrong without further reading.
-
redis-benchmark: Remove unused buffer
This just deletes old code that didn't get removed when logic changed. We were setting offsets that never got read anywhere. Since clients are now just cloned, we don't need to track per-client buffer offsets anywhere because they are all the same from the original client.
-
Fix potential error when generating INFO string
Clang (scan-build) flags this as an error, but it can't happen under normal usage because the input is verified in caller function. Clang doesn't trust the caller to always pass correct input though, so it gets registered as an error in the report. It's better to remove the possibility of a crash, even if only technically. It also makes our error report cleaner since we know this isn't a problem.
-
Sentinel: Improve INFO command behavior
Improvements: - Return error if asking for bad section (INFO foo) - Fix potential memory leak (caused by sdsempty() then returned if >2 args) - Clean up argument parsing - Allow "all" as valid section (same as "default" or zero args currently) - Move strcasecmp to end of evaluation chain in conditionals Also, since we're C99, I moved some variable declarations to be closer to where they are actually used (saves us from needing to free an empty info if detect argument errors up front). Closes redis#1915
-
Deny CLIENT command in scripts
We don't want scripts doing CLIENT SETNAME or CLIENT KILL or CLIENT LIST or CLIENT PAUSE. Originally reported by Chris Wj then proper action inspired by Itamar Haber. Reference: https://groups.google.com/forum/#!topic/redis-db/09B2EYwyVgk