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

Modified Files:
        sql_updates.mx 
Log Message:
Correct the check of the column update


Index: sql_updates.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_updates.mx,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- sql_updates.mx      20 Apr 2007 07:19:00 -0000      1.117
+++ sql_updates.mx      3 May 2007 23:39:58 -0000       1.118
@@ -822,13 +822,16 @@
                sql_kc *c = o->data;
                stmt *upd;
 
-               if (updates[c->c->colnr] && action == ACT_CASCADE) {
-                       upd = stmt_dup(updates[c->c->colnr]->op2.stval);
-               } else {
+               if (updates[c->c->colnr]) {
+                       if(action == ACT_CASCADE) 
+                               upd = stmt_dup(updates[c->c->colnr]->op2.stval);
                        if (action == ACT_SET_DEFAULT)
                                upd = stmt_atom(atom_general(&fc->c->type, 
fc->c->def, 0));
-                       else
+                       if(action == ACT_SET_NULL) 
                                upd = stmt_atom(atom_general(&fc->c->type, 
NULL, 0));
+               } else {
+                        upd = stmt_dup(updates[updcol]->op2.stval);
+                        upd = stmt_semijoin(stmt_bat(c->c, stmt_dup(ts), 
RDONLY), upd);
                }
 
                if (!upd || (upd = check_types(sql, &fc->c->type, upd, 
type_equal)) == NULL) {


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