Compare commits

...

4 Commits
2.2.1 ... 2.2.2

Author SHA1 Message Date
antirez
048c0f0f37 RELEASE NOTES updated 2011-03-04 16:31:20 +01:00
antirez
3eb3cc9da4 version is now 2.2.2 2011-03-04 16:29:38 +01:00
antirez
74f6ee8dd5 Fixed return value of GETRANGE / SUBSTR 2011-03-04 16:23:18 +01:00
antirez
7a55d72f28 AOF file descriptor leak fixed 2011-03-04 16:14:09 +01:00
4 changed files with 16 additions and 4 deletions

View File

@@ -12,6 +12,16 @@ for 2.0.
CHANGELOG
---------
What's new in Redis 2.2.2
=========================
Redis 2.2.2 is a bugfix release. Changelog:
* AOF file descriptor leak after the first rewrite fixed.
* Return value of GETRANGE / SUBSTR is now an empty string if the interval
specified is not valid, or the key does not exist. Was a null bulk reply
before, but this is against the Redis way.
What's new in Redis 2.2.1
=========================

View File

@@ -220,8 +220,10 @@ int loadAppendOnlyFile(char *filename) {
int appendonly = server.appendonly;
long loops = 0;
if (redis_fstat(fileno(fp),&sb) != -1 && sb.st_size == 0)
if (fp && redis_fstat(fileno(fp),&sb) != -1 && sb.st_size == 0) {
fclose(fp);
return REDIS_ERR;
}
if (fp == NULL) {
redisLog(REDIS_WARNING,"Fatal error: can't open the append log file for reading: %s",strerror(errno));

View File

@@ -259,7 +259,7 @@ void getrangeCommand(redisClient *c) {
return;
if (getLongFromObjectOrReply(c,c->argv[3],&end,NULL) != REDIS_OK)
return;
if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.nullbulk)) == NULL ||
if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.emptybulk)) == NULL ||
checkType(c,o,REDIS_STRING)) return;
if (o->encoding == REDIS_ENCODING_INT) {
@@ -280,7 +280,7 @@ void getrangeCommand(redisClient *c) {
/* Precondition: end >= 0 && end < strlen, so the only condition where
* nothing can be returned is: start > end. */
if (start > end) {
addReply(c,shared.nullbulk);
addReply(c,shared.emptybulk);
} else {
addReplyBulkCBuffer(c,(char*)str+start,end-start+1);
}

View File

@@ -1 +1 @@
#define REDIS_VERSION "2.2.1"
#define REDIS_VERSION "2.2.2"