Changeset: 2d898ae53f01 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2d898ae53f01
Modified Files:
        sql/backends/monet5/sql_scenario.c
Branch: ustr
Log Message:

only call sqlcleanup once


diffs (44 lines):

diff --git a/sql/backends/monet5/sql_scenario.c 
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -1546,7 +1546,8 @@ parse_execute(Client c, backend *be, sym
                }
                if (err)
                        m->session->status = -10;
-               sqlcleanup(be, 0);
+               if (msg)
+                       sqlcleanup(be, 0);
                c->query = NULL;
                return msg;
        }
@@ -1554,6 +1555,7 @@ parse_execute(Client c, backend *be, sym
                return msg;
 
        if (c->curprg->def->stop == 1) {
+               assert(0);
                printf("not used ???\n");
                sqlcleanup(be, 0);
                return NULL;
@@ -1569,7 +1571,8 @@ parse_execute(Client c, backend *be, sym
        be->q = NULL;
        if (msg)
                m->session->status = -10;
-       sqlcleanup(be, (!msg) ? 0 : -1);
+       if (msg)
+               sqlcleanup(be, (!msg) ? 0 : -1);
        MSresetInstructions(c->curprg->def, 1);
        freeVariables(c, c->curprg->def, NULL, oldvtop);
        /*
@@ -1699,8 +1702,12 @@ SQLparser_body(Client c, backend *be)
                }
                m->session->schema_name = os->base.name;
                m->session->schema = os;
+               if (!msg)
+                       sqlcleanup(be, 0);
        } else {
                msg = parse_execute(c, be, m->sym);
+               if (!msg)
+                       sqlcleanup(be, 0);
        }
        m->sym = NULL;
 finalize:
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to