]> git.saurik.com Git - redis.git/blobdiff - src/redis.h
sds.c single quotes support
[redis.git] / src / redis.h
index af08145e6b819ae03cbbf1938d0bb7f099fc8e0f..1a9891ecaccd046dfc825bdaa97662ab40022dc8 100644 (file)
 #define REDIS_UNBLOCKED 256 /* This client was unblocked and is stored in
                                server.unblocked_clients */
 #define REDIS_LUA_CLIENT 512 /* This is a non connected client used by Lua */
+#define REDIS_ASKING 1024   /* Client issued the ASKING command */
 
 /* Client request types */
 #define REDIS_REQ_INLINE 1
 #define REDIS_MAXMEMORY_NO_EVICTION 5
 
 /* Scripting */
-#define REDIS_LUA_TIME_LIMIT 60000 /* milliseconds */
+#define REDIS_LUA_TIME_LIMIT 5000 /* milliseconds */
 
 /* We can print the stacktrace, so our assert is defined this way: */
 #define redisAssertWithInfo(_c,_o,_e) ((_e)?(void)0 : (_redisAssertWithInfo(_c,_o,#_e,__FILE__,__LINE__),_exit(1)))
@@ -344,7 +345,7 @@ struct sharedObjectsStruct {
     robj *crlf, *ok, *err, *emptybulk, *czero, *cone, *cnegone, *pong, *space,
     *colon, *nullbulk, *nullmultibulk, *queued,
     *emptymultibulk, *wrongtypeerr, *nokeyerr, *syntaxerr, *sameobjecterr,
-    *outofrangeerr, *noscripterr, *loadingerr, *plus,
+    *outofrangeerr, *noscripterr, *loadingerr, *slowscripterr, *plus,
     *select0, *select1, *select2, *select3, *select4,
     *select5, *select6, *select7, *select8, *select9,
     *messagebulk, *pmessagebulk, *subscribebulk, *unsubscribebulk, *mbulk3,
@@ -638,6 +639,8 @@ struct redisServer {
     long long lua_time_start;
     int lua_random_dirty; /* True if a random command was called during the
                              exection of the current script. */
+    int lua_timedout;     /* True if we reached the time limit for script
+                             execution. */
 };
 
 typedef struct pubsubPattern {
@@ -1121,11 +1124,13 @@ void unwatchCommand(redisClient *c);
 void clusterCommand(redisClient *c);
 void restoreCommand(redisClient *c);
 void migrateCommand(redisClient *c);
+void askingCommand(redisClient *c);
 void dumpCommand(redisClient *c);
 void objectCommand(redisClient *c);
 void clientCommand(redisClient *c);
 void evalCommand(redisClient *c);
 void evalShaCommand(redisClient *c);
+void scriptCommand(redisClient *c);
 
 #if defined(__GNUC__)
 void *calloc(size_t count, size_t size) __attribute__ ((deprecated));