Update of /cvsroot/monetdb/sql/src/backends/monet4
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18927/backends/monet4

Modified Files:
        Makefile.ag sql_server.mx sql_session.mx 
Log Message:
use the new ro,su, and suro storage variants


Index: sql_session.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet4/sql_session.mx,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -d -r1.236 -r1.237
--- sql_session.mx      11 Jan 2008 10:51:57 -0000      1.236
+++ sql_session.mx      15 Jan 2008 10:42:52 -0000      1.237
@@ -66,7 +66,6 @@
 #include <sql_storage.h>
 #include <mapi/mapi.h>
 
-static int SQLdebug = 0;
 static int keep_trace = 0;
 static char *sqlinit = NULL;
 
@@ -157,22 +156,22 @@
        if (s){
                stmt *opt;
 
-               if (mvc_debug_on(c,32)) 
+               if (mvc_debug_on(c,128)) 
                        stmt2dot(s, 1, "/tmp/g1.dot");
                opt = optimize(c, s);
                stmt_destroy(s);
                s = opt;
-               if (mvc_debug_on(c,32)) 
+               if (mvc_debug_on(c,128)) 
                        stmt2dot(s, 2, "/tmp/g2.dot");
                opt = rel2bin(c, s);
                stmt_destroy(s);
                s = opt;
-               if (mvc_debug_on(c,32)) 
+               if (mvc_debug_on(c,128)) 
                        stmt2dot(s, 3, "/tmp/g3.dot");
                opt = bin_optimizer(c, s);
                stmt_destroy(s);
                s = opt;
-               if (mvc_debug_on(c,32)) 
+               if (mvc_debug_on(c,128)) 
                        stmt2dot(s, 4, "/tmp/g4.dot");
        }
        return s;
@@ -1005,7 +1004,6 @@
 ptr
 sql_frontend(void)
 {
-       char *debug_str = GDKgetenv("sql_debug");
        char *m_clients = GDKgetenv("mapi_clients"); 
        int nr = (m_clients)?strtol(m_clients, NULL, 10):1;
        mapi_frontend *f = (mapi_frontend*)GDKmalloc(sizeof(mapi_frontend));
@@ -1015,10 +1013,7 @@
        f->f_init  = sql_client_init;
        f->f_free  = sql_client_free;
        f->f_engine  = sql_client_engine; /* read/parse/execute loop */
-
        sqlinit = GDKgetenv("sqlinit");
-       if (debug_str) 
-               SQLdebug = strtol(debug_str,NULL,10);
        return (ptr)f;
 }
 

Index: Makefile.ag
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet4/Makefile.ag,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- Makefile.ag 11 Jan 2008 10:51:56 -0000      1.45
+++ Makefile.ag 15 Jan 2008 10:42:51 -0000      1.46
@@ -57,7 +57,7 @@
                sql_session.mx \
                sql_gencode.mx \
                sql_result.mx
-       LIBS = ../../server/libsqlserver ../../storage/libstore 
../../storage/bat/libbatstore ../../storage/m4/libm4store 
../../common/libsqlcommon \
+       LIBS = ../../server/libsqlserver ../../storage/libstore 
../../storage/bat/libbatstore ../../storage/restrict/librestrictstore 
../../storage/m4/libm4store ../../common/libsqlcommon \
                $(MONETDB_LIBS) -lbat -lstream $(MONETDB4_LIBS) -lmonet \
                $(MONETDB4_MODS) -l_logger -l_streams -l_bat -l_builtin 
-l_ascii_io -l_algebra -l_str -l_monettime \
                $(PTHREAD_LIBS)

Index: sql_server.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet4/sql_server.mx,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -d -r1.186 -r1.187
--- sql_server.mx       11 Jan 2008 10:51:57 -0000      1.186
+++ sql_server.mx       15 Jan 2008 10:42:52 -0000      1.187
@@ -286,6 +286,8 @@
 #include "sql_mvc.h"
 #include "sql_server.proto.h"
 
+int SQLdebug;
+
 #endif /*_SQL_SERVER_H_*/
 
 @c
@@ -311,6 +313,8 @@
 directory.
 @c
 
+int SQLdebug = 0;
+
 void
 monet4_freestack(backend_stack stk)
 {
@@ -343,11 +347,15 @@
 int
 sql_frontend_wrap(Cntxt stk, YYSTREE lt, ValPtr res)
 {
+       char *debug_str = GDKgetenv("sql_debug");
        Client father = NULL;
 
        if (lt->cnt != 0) 
                return handle_argerror(res, lt->cnt, 0);
 
+       if (debug_str) 
+               SQLdebug = strtol(debug_str,NULL,10);
+
        memset((char *)&be_funcs, '\0', sizeof(backend_functions));
        be_funcs.fstack = &monet4_freestack;
        be_funcs.fcode = &monet4_freecode;
@@ -362,9 +370,15 @@
        }
        if (father)
                stk = father->stk;
-       if (mvc_init(0/*debug*/, store_bat, (backend_stack) stk) < 0) {
+       if (((SQLdebug&64)!=0 && (SQLdebug&32)!=0 &&
+               mvc_init(FALSE, store_suro, (backend_stack)stk) < 0) ||
+           ((SQLdebug&64)!=0 && (SQLdebug&32)==0 && 
+               mvc_init(FALSE, store_su, (backend_stack)stk) < 0) ||
+           ((SQLdebug&64)==0 && (SQLdebug&32)!=0 &&
+               mvc_init(FALSE, store_ro, (backend_stack)stk) < 0) ||
+           ((SQLdebug&64)==0 && (SQLdebug&32)==0 && 
+               mvc_init(FALSE, store_bat, (backend_stack)stk) < 0))
                return GDK_FAIL;
-       }
        res->vtype = TYPE_ptr;
        res->val.pval = (ptr) sql_frontend();
        return GDK_SUCCEED;


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to