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

Modified Files:
      Tag: SQL_2-18
        sql_result.mx 
Log Message:
also initialize error field
+ some cleanup


Index: sql_result.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_result.mx,v
retrieving revision 1.55
retrieving revision 1.55.4.1
diff -u -d -r1.55 -r1.55.4.1
--- sql_result.mx       3 Jan 2007 12:39:27 -0000       1.55
+++ sql_result.mx       21 Jun 2007 08:03:37 -0000      1.55.4.1
@@ -458,6 +458,7 @@
 
                as.nr_attrs = list_length(t->columns.set);
                as.nr = sz;
+               as.error = NULL;
                fmt = as.format = (Column *) GDKmalloc(sizeof(Column) * 
(as.nr_attrs + 1));
 
                if (!isa_block_stream(bs->s))
@@ -468,7 +469,7 @@
 
                        fmt[i].name = col->base.name;
                        fmt[i].sep = (n->next) ? _strdup(sep) : _strdup(rsep);
-                       fmt[i].seplen = (int) strlen(fmt[i].sep);
+                       fmt[i].seplen = _strlen(fmt[i].sep);
                        fmt[i].type = col->type.type->base.name;
                        fmt[i].adt = ATOMindex(fmt[i].type);
                        fmt[i].tostr = &_ASCIIadt_toStr;
@@ -476,6 +477,7 @@
                        fmt[i].extra = fmt+i;
                        fmt[i].data = NULL;
                        fmt[i].len = 0;
+                       fmt[i].c = NULL;
                        if (col->type.type->eclass == EC_DEC) {
                                fmt[i].tostr = &dec_tostr;
                                fmt[i].frstr = &dec_frstr;
@@ -484,7 +486,7 @@
                }
                if (TABLETcreate_bats(&as) >= 0) {
                        if (TABLETload_file(&as, bs, out) >= 0)
-                                bats = TABLETcollect_bats(&as);
+                               bats = TABLETcollect_bats(&as);
                }
                TABLETdestroy_format(&as);
        }
@@ -726,7 +728,7 @@
 
        fmt[0].c = NULL;
        fmt[0].sep = _strdup("[ ");
-       fmt[0].seplen = (int) strlen(fmt[0].sep);
+       fmt[0].seplen = _strlen(fmt[0].sep);
 
        for (i = 1; i <= t->nr_cols; i++) {
                res_col *c = t->cols + (i - 1);
@@ -737,7 +739,7 @@
                fmt[i].c = BATdescriptor(c->b);
                fmt[i].name = NULL;
                fmt[i].sep = ((i - 1) < (t->nr_cols - 1)) ? _strdup(sep) : 
_strdup(rsep);
-               fmt[i].seplen = (int) strlen(fmt[i].sep);
+               fmt[i].seplen = _strlen(fmt[i].sep);
                fmt[i].type = ATOMname(fmt[i].c->ttype);
                fmt[i].adt = fmt[i].c->ttype;
                fmt[i].tostr = &_ASCIIadt_toStr;


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to