| 6800 | } |
| 6801 | |
| 6802 | static 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 | |
| 6816 | static int flush_sp(SP sp, char **err) |
| 6817 | { |
no test coverage detected