Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv11200
Modified Files:
sql_scenario.mx
Log Message:
Reverted some seemingly harmess replacements,
because it had broken 'explain select * from tables';
Index: sql_scenario.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_scenario.mx,v
retrieving revision 1.250
retrieving revision 1.251
diff -u -d -r1.250 -r1.251
--- sql_scenario.mx 20 Feb 2007 13:23:37 -0000 1.250
+++ sql_scenario.mx 20 Feb 2007 16:58:15 -0000 1.251
@@ -1197,7 +1197,6 @@
SQLengineIntern(Client c, backend *be)
{
str msg = MAL_SUCCEED;
- MalBlkPtr mb;
MalStkPtr oldglb = c->glb;
char oldlang= be->language;
mvc *m = be->mvc;
@@ -1212,8 +1211,7 @@
sqlcleanup(be->mvc, 0);
goto cleanup_engine;
}
- mb= c->curprg->def;
- if (mb->errors){
+ if (c->curprg->def->errors){
sqlcleanup(be->mvc, 0);
throw(SQL, "SQLengine", "Program contains errors");
}
@@ -1221,7 +1219,7 @@
stream_printf(GDKout, "#Ready to execute SQL statement\n");
#endif
- if( mb->stop == 1 ){
+ if( c->curprg->def->stop == 1 ){
sqlcleanup(be->mvc, 0);
return MAL_SUCCEED;
}
@@ -1241,12 +1239,12 @@
@c
if( be->q) {
InstrPtr p;
- p = getInstrPtr(mb,1);
+ p = getInstrPtr(c->curprg->def,1);
if( p->blk)
printFunction(c->fdout, p->blk, c->listing);
}
- mb->errors = -1; /* don;t execute */
+ c->curprg->def->errors = -1; /* don;t execute */
}
c->glb = 0;
be->language= 'D';
@@ -1255,18 +1253,18 @@
in the context of a user global environment. We have a private
environment.
@c
- if( MALcommentsOnly(mb)) {
+ if( MALcommentsOnly(c->curprg->def)) {
msg= MAL_SUCCEED;
} else {
- msg = (str) runMAL(c, mb, 1, 0, 0, 0);
+ msg = (str) runMAL(c, c->curprg->def, 1, 0, 0, 0);
}
cleanup_engine:
if (msg) {
if (getExceptionType(msg) == OPTIMIZER) {
- resetMalBlk( mb, 1);
- /* resetInstructions(mb, 1);*/
- freeVariables(mb, c->glb, be->vtop);
+ resetMalBlk( c->curprg->def, 1);
+ /* resetInstructions(c->curprg->def, 1);*/
+ freeVariables(c->curprg->def, c->glb, be->vtop);
be->language = oldlang;
c->glb = oldglb;
return SQLrecompile(c, be);
@@ -1284,14 +1282,14 @@
@c
/* postpone
if( be->q &&
- fndArgProperty(mb, getInstrPtr(mb,0),0,putName("runonce",7))){
+ fndArgProperty(c->curprg->def,
getInstrPtr(c->curprg->def,0),0,putName("runonce",7))){
}
*/
be->q = NULL;
sqlcleanup(be->mvc, 0);
- resetMalBlk( mb, 1);
- /* resetInstructions(mb, 1);*/
- freeVariables(mb, c->glb, be->vtop);
+ resetMalBlk( c->curprg->def, 1);
+ /* resetInstructions(c->curprg->def, 1);*/
+ freeVariables(c->curprg->def, c->glb, be->vtop);
be->language = oldlang;
@-
Any error encountered during execution should block further processing
@@ -1315,9 +1313,8 @@
stmt *s;
int ret = 0;
mvc *m = be->mvc;
- MalBlkPtr mb= c->curprg->def;
- int oldvtop = mb->vtop;
- int oldstop = mb->stop;
+ int oldvtop = c->curprg->def->vtop;
+ int oldstop = c->curprg->def->stop;
SQLCacheRemove(&ret, &be->q->name);
s = sql_symbol2stmt(m, be->q->s);
@@ -1325,15 +1322,15 @@
be->q->stk = 0;
stmt_destroy(s);
- pushEndInstruction(mb);
+ pushEndInstruction(c->curprg->def);
- chkTypes(c->nspace, mb); /* resolve types */
- if (mb->errors) {
+ chkTypes(c->nspace, c->curprg->def); /* resolve types */
+ if (c->curprg->def->errors) {
showErrors();
/* restore the state */
- resetMalBlk(mb, oldstop);
- freeVariables(mb, c->glb, oldvtop);
- mb->errors = 0;
+ resetMalBlk(c->curprg->def, oldstop);
+ freeVariables(c->curprg->def, c->glb, oldvtop);
+ c->curprg->def->errors = 0;
throw(SQL, "SQLrecompile", "Semantic errors");
}
return SQLengineIntern(c, be);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins