summaryrefslogtreecommitdiff
path: root/src/scripting.c
Commit message (Collapse)AuthorAgeFilesLines
* PSYNC2: luaCreateFunction() should handle NULL client parameter.antirez2017-11-291-5/+10
| | | | | See #4483. This is needed because luaCreateFunction() is now called from RDB loading code outside a client context.
* Nested MULTI/EXEC may replicate in different cases.Yossi Gottlieb2017-11-221-0/+8
| | | | | | | For example: 1. A module command called within a MULTI section. 2. A Lua script with replicate_commands() called within a MULTI section. 3. A module command called from a Lua script in the above context.
* Fix lua ldb command logliangsijian2017-07-241-0/+1
|
* Fix abort typo in Lua debugger help screen.antirez2017-06-301-1/+1
|
* Set lua-time-limit default value at safe place.antirez2017-04-111-1/+0
| | | | | | Otherwise, as it was, it will overwrite whatever the user set. Close #3703.
* Merge pull request #732 from evilpacket/remove_dofileSalvatore Sanfilippo2016-05-081-0/+2
|\ | | | | Removes dofile() from Lua
| * Removed dofile() from LuaAdam Baldwin2012-10-251-0/+2
| |
* | Cluster: don't check scripts key slots during AOF loading.antirez2016-05-051-2/+4
| |
* | Merge pull request #2956 from pkulchenko/global-protection-msg-typoSalvatore Sanfilippo2016-05-051-1/+1
|\ \ | | | | | | Update global protection error message
| * | Update global protection error message to fix a typo.Paul Kulchenko2015-12-151-1/+1
| | |
* | | Fix INFO commandstats reporting when argv is rewritten.antirez2016-03-021-1/+1
| | | | | | | | | | | | | | | We want to report the original command in the stats, for example GEOADD, even when what is actually executed is the ZADD implementation.
* | | Scripting: handle trailing comments.antirez2016-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix, provided by Paul Kulchenko (@pkulchenko), allows the Lua scripting engine to evaluate statements with a trailing comment like the following one: EVAL "print() --comment" 0 Lua can't parse the above if the string does not end with a newline, so now a final newline is always added automatically. This does not change the SHA1 of scripts since the SHA1 is computed on the body we pass to EVAL, without the other code we add to register the function. Close #2951.
* | | Lua debugger: fix crash printing nested or deep objects.antirez2016-01-081-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example of offending code: > script debug yes OK > eval "local a = {1} a[1] = a\nprint(a)" 0 1) * Stopped at 1, stop reason = step over 2) -> 1 local a = {1} a[1] = a > next 1) * Stopped at 2, stop reason = step over 2) -> 2 print(a) > print ... server crash ... Close #2955.
* | | Merge pull request #2954 from pkulchenko/debug-table-pretty-printingSalvatore Sanfilippo2015-12-221-1/+2
|\ \ \ | | | | | | | | Update pretty printing during debugging to generate valid Lua code for tables
| * | | Update pretty printing in debugging to generate valid Lua code for tables.Paul Kulchenko2015-12-151-1/+2
| |/ /
* | | Merge pull request #2957 from pkulchenko/debug-userdata-pretty-printingSalvatore Sanfilippo2015-12-221-2/+2
|\ \ \ | | | | | | | | Update pretty printing in debugging to generate valid Lua code for userdata-like types.
| * | | Update pretty printing in debugging to generate valid Lua code for ↵Paul Kulchenko2015-12-151-2/+2
| |/ / | | | | | | | | | userdata-like types.
* | | Suppress harmless warnings.antirez2015-12-161-1/+5
|/ /
* | Revert Lua's `redis.LOG_<level>` to originalItamar Haber2015-11-271-4/+4
| | | | | | Fixes #2898
* | Lua debugger: infinite loop detection.ldbantirez2015-11-181-7/+35
| |
* | Lua debugger: fix trace command infinite loop.antirez2015-11-171-5/+6
| | | | | | | | Thanks to Itamar Haber for bug report and test case to reproduce.
* | Lua debugger: maxlen command implemented.antirez2015-11-171-14/+54
| | | | | | | | Let the user control the replies truncation.
* | Lua debugger: trace command implemented.antirez2015-11-171-0/+24
| |
* | Lua debugger: print without args show all local vars.antirez2015-11-171-5/+34
| |
* | Lua debugger: default behavior of "list" command changed.antirez2015-11-171-4/+14
| | | | | | | | | | | | Now it lists code around the current position by default. Can list any other part using other arguments, but a new "whole" command was added in order to show the whole source code easily.
* | Lua debugging: fix error message for SCRIPT DEBUG.antirez2015-11-171-1/+1
| | | | | | | | | | | | "async" -> "sync". Thanks to Itamar Haber for reporting.
* | Lua debugger: reply +OK to SCRIPT DEBUG no.antirez2015-11-171-0/+1
| | | | | | | | Thanks to Itamar Haber for reporting.
* | Lua debugger: call wait3() if there are pending forked debugging sessions.antirez2015-11-171-0/+6
| |
* | Lua debugger: abort implemented.antirez2015-11-171-0/+5
| |
* | Lua debugger: ldbSendLogs() memory leak fixed.antirez2015-11-171-0/+1
| |
* | Lua debugger: better support for synchronous mode.antirez2015-11-171-0/+6
| |
* | Lua debugger: handle forked sessions children during shutdown.antirez2015-11-171-1/+41
| |
* | Lua debugger: fix help typo, beark -> break.antirez2015-11-171-4/+4
| |
* | Lua debugger: clear end of session protocol.antirez2015-11-171-0/+4
| | | | | | | | | | | | | | When the debugger exits now it produces an <endsession> tag that informs redis-cli (or other debugging clients) that the session terminated. This way the client knows there is yet another reply to read (the one of the EVAL script itself), and can switch to non-debugging mode ASAP.
* | Lua debugger: redis.debug() implemented.antirez2015-11-171-15/+43
| |
* | Lua debugger: removing breakpoints now works.antirez2015-11-171-1/+1
| |
* | Lua debugger: redis command implemented.antirez2015-11-171-1/+26
| |
* | Lua debugger: try to eval as expression first.antirez2015-11-171-4/+13
| | | | | | | | | | | | | | | | | | It's handly to just eval "5+5" without the return and see it printed on the screen as result. However prepending "return" does not always result into valid Lua code. So what we do is to exploit a common Lua community trick of trying to compile with return prepended, and if compilation fails then it's not an expression that can be returned, so we try again without prepending "return". Works great apparently.
* | Lua debugger: much better Lua values pretty printer.antirez2015-11-171-16/+69
| |
* | Lua debugger: print now handles ARGV and KEYS.antirez2015-11-171-2/+10
| |
* | Lua debugger: added comment about helper functions.antirez2015-11-171-0/+3
| |
* | Lua debugger: redis.breakpoint() implemented.antirez2015-11-171-2/+27
| |
* | Lua debugger: output improvements, eval command.antirez2015-11-171-48/+160
| |
* | Lua debugger: breakpoints.antirez2015-11-171-11/+95
| |
* | Lua debugger: ability to show local vars content.antirez2015-11-171-7/+85
| |
* | Lua debugger: log Redis commands. List command.antirez2015-11-171-7/+80
| |
* | Lua debugger: initial REPL.antirez2015-11-171-18/+154
| |
* | Lua debugger: foundations implemented.antirez2015-11-171-17/+181
| |
* | Merge pull request #2848 from badboy/removed-printfSalvatore Sanfilippo2015-11-091-1/+0
|\ \ | | | | | | Remove printf
| * | Remove printfJan-Erik Rediger2015-11-041-1/+0
| | |