MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / exec_thread_int

Function exec_thread_int

lua/sp.c:7092–7111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7090}
7091
7092static 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
7113static int push_args_and_run_sp(struct sqlclntstate *clnt, const char *arg_str, char **err)
7114{

Callers 1

exec_threadFunction · 0.85

Calls 5

clone_temp_tablesFunction · 0.85
lua_gettopFunction · 0.85
begin_spFunction · 0.85
run_spFunction · 0.85
commit_spFunction · 0.85

Tested by

no test coverage detected