Changeset: f5422461d978 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f5422461d978
Modified Files:
monetdb5/mal/mal.h
monetdb5/mal/mal_session.c
sql/backends/monet5/sql_scenario.c
Branch: default
Log Message:
when connecting with msql make sure we keep the temporary variables around.
This allows for interactive
debugging of mal/sql statements using mclient -lmsql.
diffs (37 lines):
diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h
--- a/monetdb5/mal/mal.h
+++ b/monetdb5/mal/mal.h
@@ -211,7 +211,8 @@ typedef struct MALSTK {
int stkbot; /* the first variable to be initialized
*/
int stkdepth; /* to protect against runtime stack overflow */
int calldepth; /* to protect against runtime stack overflow */
- short keepAlive; /* do not garbage collect when set */
+ bool keepAlive:1, /* do not garbage collect when set */
+ keepTmps:1; /* also do not garbage collect tmps (needed for
interactive debugging only) */
/*
* Parallel processing is mostly driven by dataflow, but within this
context
* there may be different schemes to take instructions into execution.
diff --git a/monetdb5/mal/mal_session.c b/monetdb5/mal/mal_session.c
--- a/monetdb5/mal/mal_session.c
+++ b/monetdb5/mal/mal_session.c
@@ -443,7 +443,7 @@ MSresetStack(Client cntxt, MalBlkPtr mb,
if (mb->errors == MAL_SUCCEED){
for (i = sig->argc; i < mb->vtop; i++) {
- if (glb && i < glb->stktop && isTmpVar(mb,i) ) {
+ if (glb && i < glb->stktop && isTmpVar(mb,i) &&
!glb->keepTmps) {
/* clean stack entry */
garbageElement(cntxt, &glb->stk[i]);
glb->stk[i].vtype = TYPE_int;
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
@@ -692,6 +692,8 @@ SQLinitClientFromMAL(Client c)
}
mvc* m = ((backend*) c->sqlcontext)->mvc;
+ if (c->glb)
+ c->glb->keepTmps = true;
/* Crucial step:
* MAL scripts that interact with the sql module
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list