Changeset: d909da645972 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d909da645972
Modified Files:
        sql/backends/monet5/datacell/receptor.c
        sql/backends/monet5/sql.mx
Branch: Feb2013
Log Message:

merged heads


diffs (50 lines):

diff --git a/sql/backends/monet5/datacell/receptor.c 
b/sql/backends/monet5/datacell/receptor.c
--- a/sql/backends/monet5/datacell/receptor.c
+++ b/sql/backends/monet5/datacell/receptor.c
@@ -420,7 +420,7 @@ bodyRestart:
                  read it*/
 
                if ((n = mnstr_readline(receptor, buf, MYBUFSIZ)) > 0) {
-                       buf[n + 1] = 0;
+                       buf[n] = 0;
 #ifdef _DEBUG_RECEPTOR_
                        mnstr_printf(RCout, "#Receptor buf [" SSZFMT "]:%s \n", 
n, buf);
                        m = 0;
@@ -448,7 +448,7 @@ bodyRestart:
                        /* this code should be optimized for block-based reads 
*/
                        while (cnt < counter) {
                                if ((n = mnstr_readline(receptor, buf, 
MYBUFSIZ)) > 0) {
-                                       buf[n + 1] = 0;
+                                       buf[n] = 0;
 #ifdef _DEBUG_RECEPTOR_
                                        mnstr_printf(RCout, "#Receptor buf [" 
SSZFMT "]:%s \n", n, buf);
 #endif
diff --git a/sql/backends/monet5/sql.mx b/sql/backends/monet5/sql.mx
--- a/sql/backends/monet5/sql.mx
+++ b/sql/backends/monet5/sql.mx
@@ -4240,17 +4240,19 @@ mvc_import_table_wrap(Client cntxt, MalB
 #else
        s = bstream_create(ss, 0x2000000);
 #endif
-       if (!s)
-               throw(IO, "bstreams.create", "failed to create block stream");
-       b = mvc_import_table(cntxt, m, s, *sname, *tname, (char*)tsep, 
(char*)rsep, (char*)ssep, (char*)ns, *sz, *offset, *locked);
-       bstream_destroy(s);
+       if (s != NULL) {
+               b = mvc_import_table(cntxt, m, s, *sname, *tname, (char*)tsep, 
(char*)rsep, (char*)ssep, (char*)ns, *sz, *offset, *locked);
+               bstream_destroy(s);
+       }
        GDKfree(filename);
        GDKfree(tsep);
        GDKfree(rsep);
-       if(ssep)
+       if (ssep)
                GDKfree(ssep);
        GDKfree(ns);
-       if (!b)
+       if (s == NULL)
+               throw(IO, "bstreams.create", "failed to create block stream");
+       if (b == NULL)
                throw(SQL, "importTable", "%sfailed to import table", 
m->errstr);
        bat2return(stk, pci, b);
        GDKfree(b);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to