Changeset: 8db8b6a82ea2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8db8b6a82ea2
Modified Files:
        sql/common/sql_types.c
        
sql/test/BugDay_2005-11-09_2.9.3/Tests/sql_server_crash.SF-1080024.stable.out
Branch: Jun2016
Log Message:

make sure that for (sql) ANY functions all any arguments are the same type.


diffs (37 lines):

diff --git a/sql/common/sql_types.c b/sql/common/sql_types.c
--- a/sql/common/sql_types.c
+++ b/sql/common/sql_types.c
@@ -681,6 +681,21 @@ sql_dup_subfunc(sql_allocator *sa, sql_f
                                list_append(fres->res, res);
                        }
                }
+               if (member) { /* check that the types of all EC_ANY's are equal 
*/
+                       sql_subtype *st = NULL;
+                       node *m;
+
+                       if (ops) for (tn = ops->h, m = f->ops->h; tn; tn = 
tn->next, m = m->next) {
+                               sql_arg *s = m->data;
+
+                               if (s->type.type->eclass == EC_ANY) {
+                                       if (!st)
+                                               st = tn->data;
+                                       else if (subtype_cmp(st, tn->data))
+                                               return NULL;
+                               }
+                       }
+               }
        }
        return fres;
 }
diff --git 
a/sql/test/BugDay_2005-11-09_2.9.3/Tests/sql_server_crash.SF-1080024.stable.out 
b/sql/test/BugDay_2005-11-09_2.9.3/Tests/sql_server_crash.SF-1080024.stable.out
--- 
a/sql/test/BugDay_2005-11-09_2.9.3/Tests/sql_server_crash.SF-1080024.stable.out
+++ 
b/sql/test/BugDay_2005-11-09_2.9.3/Tests/sql_server_crash.SF-1080024.stable.out
@@ -28,7 +28,7 @@ Ready.
 % .L # table_name
 % isnull_=_single_value # name
 % char # type
-% 5 # length
+% 6 # length
 [ NULL ]
 
 # 12:45:31 >  
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to