Changeset: 5ad40a2e20e1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5ad40a2e20e1
Modified Files:
sql/backends/monet5/mal_backend.h
sql/backends/monet5/sql_scenario.c
Branch: default
Log Message:
small cleanup
diffs (61 lines):
diff --git a/sql/backends/monet5/mal_backend.h
b/sql/backends/monet5/mal_backend.h
--- a/sql/backends/monet5/mal_backend.h
+++ b/sql/backends/monet5/mal_backend.h
@@ -51,7 +51,6 @@ typedef struct backend {
int mvc_var; /* current variable holding the latest query
context (used to create dependencies in mal statements) */
int rowcount; /* when multiple insert/update/delete/truncate
statements are present, use an accumulator to hold the total number of rows
affected */
- int vtop; /* top of the variable stack
before the current function */
int join_idx; /* number of index joins (used in rel_bin) */
lng reloptimizer; /* timer for optimizer phase */
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
@@ -366,7 +366,7 @@ SQLexecPostLoginTriggers(Client c)
stream *out = be->out;
be->out = NULL; /* no output stream */
if (!msg)
- msg = SQLrun(c,m);
+ msg = SQLrun(c, m);
// restore previous state
be->out = out;
@@ -1436,7 +1436,6 @@ SQLparser_body(Client c, backend *be)
int oldvtop = c->curprg->def->vtop;
int oldstop = c->curprg->def->stop;
- be->vtop = oldvtop;
(void)runtimeProfileSetTag(c); /* generate and set the tag in
the mal block of the clients current program. */
if (m->emode != m_prepare || (m->emode == m_prepare && (m->emod
& mod_exec) && is_ddl(r->op)) /* direct execution prepare */) {
mvc_query_processed(m);
@@ -1651,6 +1650,7 @@ SQLengine_(Client c)
if (msg || c->mode <= FINISHCLIENT)
return msg;
+ int oldvtop = c->curprg?c->curprg->def->vtop:0;
if (be->language == 'X') {
return SQLchannelcmd(c, be);
} else if (be->language !='S') {
@@ -1676,11 +1676,7 @@ SQLengine_(Client c)
assert (m->emode != m_deallocate && m->emode != m_prepare);
assert (c->curprg->def->stop > 2);
- if (MALcommentsOnly(c->curprg->def)) {
- assert(0);
- msg = MAL_SUCCEED;
- } else
- msg = SQLrun(c,m);
+ msg = SQLrun(c, m);
if (m->type == Q_SCHEMA && m->qc != NULL)
qc_clean(m->qc);
@@ -1689,7 +1685,7 @@ SQLengine_(Client c)
m->session->status = -10;
sqlcleanup(be, (!msg) ? 0 : -1);
MSresetInstructions(c->curprg->def, 1);
- freeVariables(c, c->curprg->def, NULL, be->vtop);
+ freeVariables(c, c->curprg->def, NULL, oldvtop);
/*
* Any error encountered during execution should block further
processing
* unless auto_commit has been set.
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]