Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16661

Modified Files:
      Tag: SQL_2-16
        sql_select.mx 
Log Message:
only strdup if string exits


Index: sql_select.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_select.mx,v
retrieving revision 1.175.2.2
retrieving revision 1.175.2.3
diff -u -d -r1.175.2.2 -r1.175.2.3
--- sql_select.mx       12 Feb 2007 20:10:14 -0000      1.175.2.2
+++ sql_select.mx       15 Feb 2007 15:32:10 -0000      1.175.2.3
@@ -127,9 +127,10 @@
        for (m = st->comp_type->columns.set->h; m; m = m->next) {
                sql_column *c = m->data;
                char *cname = _strdup(c->base.name);
+               char *_tname = (tname)?_strdup(tname):NULL;
                stmt *sc = stmt_rs_column(stmt_dup(sq), 
stmt_atom_string(cname), &c->type);
 
-               sc = stmt_alias(sc, _strdup(tname), _strdup(c->base.name));
+               sc = stmt_alias(sc, _tname, _strdup(c->base.name));
                sc = stmt_column(sc, stmt_dup(sq), NULL);
                table_add_column(tv, sc, NULL, cname);
        }


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to