Changeset: 3fc27b29ae23 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3fc27b29ae23
Modified Files:
        sql/backends/monet5/sql_scenario.mx
Branch: default
Log Message:

Save the MAL program after compilation
If you are not going to execut the compile plan, then you better
not clean the MAL structures.


diffs (31 lines):

diff --git a/sql/backends/monet5/sql_scenario.mx 
b/sql/backends/monet5/sql_scenario.mx
--- a/sql/backends/monet5/sql_scenario.mx
+++ b/sql/backends/monet5/sql_scenario.mx
@@ -573,7 +573,7 @@
 It expects a string and returns the name of the
 corresponding MAL block as it is known in the
 SQL_cache, where it can be picked up.
-The SQLstatement operation also executes the instruction.
+The SQLstatement operation also executes the instruction upon request.
 
 In both cases the SQL string is handled like an ordinary
 user query, following the same optimization paths and
@@ -730,6 +730,8 @@
                                freeVariables(c,c->curprg->def, c->glb, 
oldvtop);
                        }
                        sqlcleanup(m, 0);
+                       if (!execute) 
+                               goto endofcompile;
                }
 #ifdef _SQL_COMPILE
        mnstr_printf(c->fdout, "#parse/execute result %d\n", err);
@@ -739,7 +741,8 @@
 We are done; a MAL procedure recides in the cache.
 @c
 endofcompile:
-       MSresetInstructions(c->curprg->def, 1);
+       if (execute) 
+               MSresetInstructions(c->curprg->def, 1);
 
        c->state[MAL_SCENARIO_PARSER] = be;
        backend_destroy(sql);
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to