119 Commits

Author SHA1 Message Date
antirez
a044ec4e39 EVALSHA implemented 2011-05-25 12:32:49 +02:00
antirez
a073438a52 Now it is possible to return multi bulks of multi bulks from Lua, just returning tables of tables. The new conversion of the Null bulk and multi bulk type is the Lua false type. 2011-05-25 12:32:49 +02:00
antirez
98af129deb for performance reasons only set the debug hook if the time limit is enabled. 2011-05-25 12:32:49 +02:00
antirez
4f89275a16 Lua max exec time fixes: redisLog() to log the event moved before the lua_error() call that does a long jump so never returns. Aesthetic fixes in error message. 2011-05-25 12:32:49 +02:00
antirez
2ccb8cf33f call the Lua hook with minor frequency. It is already enough to call it every 100000 istructions for near millisecond precision. 2011-05-25 12:32:48 +02:00
antirez
6f6559e47e Lua scripts max execution time 2011-05-25 12:32:48 +02:00
antirez
b37b6f8ce6 call lua_gc() for incremental garbage collection. Likely there is to tune this at some point. 2011-05-25 12:32:48 +02:00
antirez
218852a836 Lua scripting: Honor SELECT command in both ways 2011-05-25 12:32:47 +02:00
antirez
e4c113dc8a Fixed a problem in the script engine that crashed the server if the reply was not stored just int the static buffer of the client structure. 2011-05-25 12:32:47 +02:00
antirez
3993a9a702 Status replies converted in a special way like errors in the Lua <-> Redis conversion code. 2011-05-25 12:32:47 +02:00
antirez
31d3c2fb22 Fixed nul bulk parsing in Redis protocol to Lua type convertion. Check for bad Lua types as arguements of the redis() Lua command. 2011-05-25 12:32:46 +02:00
antirez
ce70f9aba7 Multi bulk to Lua table now working 2011-05-25 12:32:46 +02:00
antirez
3c836ffe5a Fixed arity detection of Redis command executed from Lua script. Error reporting from Lua fixed. More work on the Redis reply to lua conversion code. 2011-05-25 12:32:45 +02:00
antirez
a55dcc3808 full conversion from Lua return value to redis reply. Partial conversion from Redis reply to Lua type. 2011-05-25 12:32:45 +02:00
antirez
4fdcf75a85 pupulate the Lua global tables KEYS and ARGV before executing the script 2011-05-25 12:32:45 +02:00
antirez
d8cdc503e7 function to access to Redis command from Lua renamed from r() to redis() 2011-05-25 12:32:45 +02:00
antirez
2039ac2211 Correctly glue the reply buffer. For now returned as it is to Lua, but will be converted into Lua native type later. 2011-05-25 12:32:44 +02:00
antirez
09e9cb316e Lua call of Redis command work in progress: sorry I have to go to the cinema to watch the Source Code movie 2011-05-25 12:32:44 +02:00
antirez
3dd67db52c Lua function creation on EVAL, basic Lua return type to Redis protocol convertion done. 2011-05-25 12:32:43 +02:00