Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27620

Modified Files:
      Tag: Nov2009
        sql.mx sql_bpm.mx sql_scenario.mx 
Log Message:
Fix the null refs.


Index: sql_scenario.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_scenario.mx,v
retrieving revision 1.356.2.11
retrieving revision 1.356.2.12
diff -u -d -r1.356.2.11 -r1.356.2.12
--- sql_scenario.mx     31 Oct 2009 18:53:17 -0000      1.356.2.11
+++ sql_scenario.mx     8 Nov 2009 13:38:53 -0000       1.356.2.12
@@ -335,6 +335,9 @@
        if (!out)
                out = GDKerr;
 
+       if ( str == NULL)
+               return 0;
+
        if (stream_errnr(out))
                return -1;
        while ((p = strchr(str, '\n')) != NULL) {
@@ -441,6 +444,8 @@
                throw(SQL, "SQLexitClient", "Catalogue not available");
        if (c->state[MAL_SCENARIO_PARSER] && c->state[MAL_SCENARIO_OPTIMIZE]) {
                mvc *m = (mvc *) c->state[MAL_SCENARIO_OPTIMIZE];
+               if ( m == NULL)
+                       throw(SQL, "SQLexitClient", "MVC catalogue not 
available");
 
                if (m->session->auto_commit && m->session->active) {
                        if (mvc_status(m) >= 0 && mvc_commit(m, 0, NULL) < 0) 

Index: sql.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql.mx,v
retrieving revision 1.358.2.9
retrieving revision 1.358.2.10
diff -u -d -r1.358.2.9 -r1.358.2.10
--- sql.mx      27 Oct 2009 12:37:35 -0000      1.358.2.9
+++ sql.mx      8 Nov 2009 13:38:52 -0000       1.358.2.10
@@ -274,7 +274,9 @@
        f  := str.iconv(fname, "UTF-8", cs);
        s  := streams.openRead(f);
        #bs := bstream.create(s, 1048576);
-       bs := bstream.create(s, 8388608);
+       #bs := bstream.create(s, 8388608);
+       bs := bstream.create(s, 33554432);
+       #bs := bstream.create(s, 67108864);
 
        res := sql.importTable(bs, sname, tname, tsep, rsep, ssep, ns, nr, 
offset);
        bstream.destroy(bs);
@@ -4220,7 +4222,7 @@
        str msg = getContext(cntxt,mb, &m, NULL);
        int first=1;
        bat mid, hid, bid;
-       BAT *map= NULL, *b;
+       BAT *b;
        node *o;
 
        if (msg)
@@ -4276,10 +4278,6 @@
        }
        /* bat was cleared */
        t->cleared = 1;
-       if (map) {
-               BBPreleaseref(map->batCacheid);
-               BBPdecref(mid, TRUE);
-       }
        return MAL_SUCCEED;
 }
 
@@ -4393,6 +4391,11 @@
        g = (bat *) Tloc(graph, BUNfirst(graph));
 
        s =  BATdescriptor(g[MAP_LEX]);
+       if ( s == NULL){
+               BBPreleaseref(graph->batCacheid);
+               throw(SQL, "sql.rdfShred", "map_lex is missing");
+       }
+
        store_funcs.append_col(m->session->tr,
                        mvc_bind_column(m, map_tbl, "lexical"), s, TYPE_bat);
        store_funcs.append_col(m->session->tr,

Index: sql_bpm.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_bpm.mx,v
retrieving revision 1.19
retrieving revision 1.19.8.1
diff -u -d -r1.19 -r1.19.8.1
--- sql_bpm.mx  7 Jan 2009 14:19:28 -0000       1.19
+++ sql_bpm.mx  8 Nov 2009 13:38:53 -0000       1.19.8.1
@@ -417,9 +417,9 @@
                throw(SQL, "mat.send_part", 
                        sql_message("column %s unknown", *cname));
         
-       VALinit(val, newBatType(TYPE_oid, TYPE_any), NULL);
        get_part(c, *part,  &val);
        if (val) {
+               VALinit(val, newBatType(TYPE_oid, TYPE_any), NULL);
                /*BATprint(b);*/
                return MAL_SUCCEED;
        }


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to