Update of /cvsroot/monetdb/sql/src/common
In directory sc8-pr-cvs16:/tmp/cvs-serv19650

Modified Files:
        sql_types.mx 
Log Message:
Some fixes to support the CALL.
We cannot delete name which is used during a loop.
If exists res->type (if it is a function) we create a return sub_type.



Index: sql_types.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/common/sql_types.mx,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- sql_types.mx        3 May 2007 23:29:28 -0000       1.85
+++ sql_types.mx        4 May 2007 14:24:15 -0000       1.86
@@ -594,10 +594,10 @@
                        int scale = 0;
                        sql_subfunc *fres = NEW(sql_subfunc);
 
-                       _DELETE(name);
                        sql_ref_init(&(fres->ref));
                        fres->func = f;
-                       sql_init_subtype(&fres->res, f->res.type, 
f->res.digits, scale);
+                       if (f->res.type)
+                               sql_init_subtype(&fres->res, f->res.type, 
f->res.digits, scale);
                        if (f->res.comp_type) 
                                fres->res.comp_type = f->res.comp_type;
                        return fres;
@@ -619,8 +619,10 @@
 
                if (!f->res.type)
                        continue;
-               if ((fres = func_cmp(f, name, nrargs )) != NULL) 
+               if ((fres = func_cmp(f, name, nrargs )) != NULL) {
+                       _DELETE(name);
                        return fres;
+               }
        }
        if (s) {
                node *n;
@@ -630,8 +632,10 @@
 
                        if (f->aggr)
                                continue;
-                       if ((fres = func_cmp(f, name, nrargs )) != NULL) 
+                       if ((fres = func_cmp(f, name, nrargs )) != NULL) {
+                               _DELETE(name);
                                return fres;
+                       }
                }
        }
        _DELETE(name);


-------------------------------------------------------------------------
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