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

Function commit_sp

lua/sp.c:6802–6814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6800}
6801
6802static int commit_sp(Lua L, char **err)
6803{
6804 SP sp = getsp(L);
6805 if (in_parent_trans(sp)) {
6806 const char *commit_err;
6807 if ((commit_err = commit_parent(L)) == NULL) return 0;
6808 *err = strdup(commit_err);
6809 return -8;
6810 }
6811 rollback_sp(L);
6812 *err = strdup("unterminated transaction (no commit or rollback)");
6813 return -222;
6814}
6815
6816static int flush_sp(SP sp, char **err)
6817{

Callers 2

exec_thread_intFunction · 0.85
exec_procedure_intFunction · 0.85

Calls 4

in_parent_transFunction · 0.85
commit_parentFunction · 0.85
rollback_spFunction · 0.85
strdupFunction · 0.50

Tested by

no test coverage detected