Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7368/src/backends/monet5
Modified Files:
sql.mx sql_scenario.mx
Log Message:
adding special output for algebra version
changed sql.trace() into sql.logfile(filename:string), which can be called
from sql too.
fixed handling of dependency problem on views (one remains)
Index: sql_scenario.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_scenario.mx,v
retrieving revision 1.293
retrieving revision 1.294
diff -u -d -r1.293 -r1.294
--- sql_scenario.mx 22 Jan 2008 23:15:35 -0000 1.293
+++ sql_scenario.mx 28 Jan 2008 16:25:52 -0000 1.294
@@ -249,16 +249,6 @@
return MAL_SUCCEED;
}
-static int keep_trace = 0;
-
-str
-SQLtrace(int *ret)
-{
- (void)ret;
- keep_trace = !keep_trace;
- return MAL_SUCCEED;
-}
-
#define SQLglobal(name, val) \
r = stmt_var(_strdup(name), &ctype, 0, 1); \
stack_push_var(sql, name, r, &ctype); \
@@ -410,13 +400,6 @@
}
_DELETE(schema);
- if (keep_trace && !m->scanner.log) {
- char fn[BUFSIZ];
-
- snprintf(fn, BUFSIZ, "sql.%d", c->idx);
- m->scanner.log = open_wastream(fn);
- }
-
/*expect SQL text first */
be->language = 'S';
c->state[MAL_SCENARIO_PARSER] = be;
Index: sql.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql.mx,v
retrieving revision 1.248
retrieving revision 1.249
diff -u -d -r1.248 -r1.249
--- sql.mx 27 Jan 2008 15:09:24 -0000 1.248
+++ sql.mx 28 Jan 2008 16:25:52 -0000 1.249
@@ -35,10 +35,6 @@
address SQLsession2
comment "Switch to processing precompiled sql statements";
-command trace():void
-address SQLtrace
-comment "Enable/disable saving the sql statement traces on a client basis.";
-
command init():void
address SQLinitEnvironment
comment "Initialize the environment for MAL";
@@ -95,6 +91,10 @@
address getVariable
comment "Get the value of a session variable";
+command logfile(filename:str):void
+address mvc_logfile
+comment "Enable/disable saving the sql statement traces";
+
command next_value( sname:str, sequence:str ):lng
address mvc_next_value
comment "return the next value of the sequence";
@@ -710,6 +710,7 @@
sql5_export str setVariable(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
sql5_export str getVariable(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
sql5_export str sql_variables(int *res);
+sql5_export str mvc_logfile(int *d, str *filename);
sql5_export str mvc_next_value(lng *res, str *sname, str *seqname);
sql5_export str mvc_bat_next_value(int *res, int *sname, str *seqname);
sql5_export str mvc_get_value(lng *res, str *sname, str *seqname);
@@ -1106,6 +1107,25 @@
}
str
+mvc_logfile(int *d, str *filename)
+{
+ mvc *m = NULL;
+ str msg = getContext(&m, NULL);
+
+ (void)d;
+ if (msg)
+ return msg;
+ if (m->scanner.log) {
+ close_stream(m->scanner.log);
+ m->scanner.log = NULL;
+ }
+
+ if (*filename != str_nil)
+ m->scanner.log = open_wastream(*filename);
+ return MAL_SUCCEED;
+}
+
+str
mvc_next_value(lng *res, str *sname, str *seqname)
{
mvc *m = NULL;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins