| 2805 | } |
| 2806 | |
| 2807 | static const char *commit_parent(Lua L) |
| 2808 | { |
| 2809 | SP sp = getsp(L); |
| 2810 | if (sp->in_parent_trans && sp->make_parent_trans) { |
| 2811 | db_commit_int(L, &sp->rc); |
| 2812 | if (sp->rc == 0) { |
| 2813 | sp->in_parent_trans = 0; |
| 2814 | sp->make_parent_trans = 0; |
| 2815 | return NULL; |
| 2816 | } |
| 2817 | if (sp->error == NULL) |
| 2818 | sp->error = "COMMIT failed for implicit transaction"; |
| 2819 | return sp->error; |
| 2820 | } |
| 2821 | return NULL; |
| 2822 | } |
| 2823 | |
| 2824 | typedef struct { |
| 2825 | SP sp1; |
no test coverage detected