| 7090 | } |
| 7091 | |
| 7092 | static int exec_thread_int(struct sqlthdstate *thd, struct sqlclntstate *clnt) |
| 7093 | { |
| 7094 | // Lua Stack: |
| 7095 | // arg n |
| 7096 | // arg n - 1 |
| 7097 | // ... |
| 7098 | // arg 2 |
| 7099 | // arg 1 |
| 7100 | // lua-func to call |
| 7101 | SP sp = clnt->sp; |
| 7102 | sp->thd = thd; |
| 7103 | Lua L = sp->lua; |
| 7104 | clone_temp_tables(sp); |
| 7105 | int args = lua_gettop(L) - 1; |
| 7106 | int rc; |
| 7107 | char *err = NULL; |
| 7108 | if ((rc = begin_sp(clnt, &err)) != 0) return rc; |
| 7109 | if ((rc = run_sp(clnt, args, &err)) != 0) return rc; |
| 7110 | return commit_sp(L, &err); |
| 7111 | } |
| 7112 | |
| 7113 | static int push_args_and_run_sp(struct sqlclntstate *clnt, const char *arg_str, char **err) |
| 7114 | { |
no test coverage detected