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

Modified Files:
        sql_select.mx 
Log Message:
propagated changes of Saturday Aug 30 2008 - Tuesday Sep 02 2008
from the SQL_2-24 branch to the development trunk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/08/30 - nielsnes: src/server/sql_select.mx,1.231.2.10
added dynamic type checks in more cases (fixes 
auto_coersion_bug.SF-2075157.sql,string_length_not_checked.SF-2075078.sql)
added checks in alter table (fixes alter_view_not_allowed.SF-2075195.sql)
fixed hanling of not in (fixes select_in_wrong_result.SF-2080168.sql)
use the new thetauselect (fixes select_not_wrong_result.SF-2080151.sql)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: sql_select.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_select.mx,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -d -r1.242 -r1.243
--- sql_select.mx       25 Aug 2008 13:36:16 -0000      1.242
+++ sql_select.mx       2 Sep 2008 13:21:24 -0000       1.243
@@ -916,7 +916,8 @@
                stmt *ors = stmt_dup(rs);
 
                /* try finding function based on first argument */
-               if ((f = sql_bind_member(s, fname, t1, 2)) != NULL) {
+               if (!EC_NUMBER(t1->type->eclass) &&
+                  (f = sql_bind_member(s, fname, t1, 2)) != NULL) {
                        node *m = f->func->ops->h;
                        sql_arg *a = m->data;
 
@@ -2091,7 +2092,6 @@
                if (matching_columns) {
                        /* Natural join and join on columns list output the
                           join columns once.  
-                          Natural join only outputs join columns.
                         */
                        list *l2 = create_stmt_list();
                        node *o = NULL, *m = l1->h, *rm;
@@ -2117,20 +2117,18 @@
                                        list_append(l2, ls);
                                }
                        }
-                       if (js) {
-                               t = tv1;
-                               m = l1->h;
-                               for (n = t->columns->h; n; n = n->next, m = 
m->next) {
-                                       cvar *cs = n->data;
-                                       if (!(o = list_find(matching_columns, 
cs, (fcmp)&cvar_cmp))) 
-                                               list_append(l2, 
stmt_dup(m->data));
-                               }
-                               t = tv2;
-                               for (n = t->columns->h; n; n = n->next, m = 
m->next) {
-                                       cvar *cs = n->data;
-                                       if (!(o = list_find(matching_columns, 
cs, (fcmp)&cvar_cmp))) 
-                                               list_append(l2, 
stmt_dup(m->data));
-                               }
+                       t = tv1;
+                       m = l1->h;
+                       for (n = t->columns->h; n; n = n->next, m = m->next) {
+                               cvar *cs = n->data;
+                               if (!(o = list_find(matching_columns, cs, 
(fcmp)&cvar_cmp))) 
+                                       list_append(l2, stmt_dup(m->data));
+                       }
+                       t = tv2;
+                       for (n = t->columns->h; n; n = n->next, m = m->next) {
+                               cvar *cs = n->data;
+                               if (!(o = list_find(matching_columns, cs, 
(fcmp)&cvar_cmp))) 
+                                       list_append(l2, stmt_dup(m->data));
                        }
                        /* add no join columns */
                        list_destroy(l1);
@@ -3557,7 +3555,11 @@
                break;
        case SQL_NOT: {
                symbol *lo = sc->data.sym;
-               stmt *ls = sql_logical_exp(sql, scp, lo, grp, subset, f, ek);
+               exp_kind iek = ek;
+               stmt *ls;
+
+               iek.reduce = 0;
+               ls = sql_logical_exp(sql, scp, lo, grp, subset, f, iek);
 
                if (!ls)
                        return NULL;
@@ -3567,10 +3569,13 @@
                
                        return stmt_unop(ls, not);
                } else { /* R.diff(ls) */
+                       return stmt_select(ls, stmt_bool(0), cmp_equal);
+                       /*
                        if (subset)
                                return stmt_diff(first_subset(subset), ls);
                        else
                                return 
stmt_diff(stmt_dup(scope_first_column(scp)->s), ls);
+                       */
                }
        }
                break;


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to