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

Modified Files:
        sql_schema.mx 
Log Message:
propagated changes of Tuesday Dec 11 2007 - Tuesday Dec 18 2007
from the SQL_2-20 branch to the development trunk


Index: sql_schema.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_schema.mx,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -d -r1.135 -r1.136
--- sql_schema.mx       3 Dec 2007 08:51:17 -0000       1.135
+++ sql_schema.mx       18 Dec 2007 10:49:12 -0000      1.136
@@ -1483,8 +1483,11 @@
                symbol *sym = l->h->next->data.sym;
                sql_column *c = mvc_bind_column(sql, t, cname);
                exp_kind ek = {type_value, card_value, FALSE};
-               stmt *tmp = sql_value_exp(sql, NULL, sym, NULL, NULL, sql_sel, 
ek);
+               stmt *tmp;
 
+               if (!c) 
+                       return sql_error(sql, 02, "column '%s' not found\n", 
cname);
+               tmp = sql_value_exp(sql, NULL, sym, NULL, NULL, sql_sel, ek);
                if (!tmp || (tmp = check_types(sql, &c->type, tmp, type_equal)) 
== NULL) 
                        return NULL;
                stmt_destroy(tmp);
@@ -1504,6 +1507,9 @@
                sql_column *c = mvc_bind_column(sql, t, cname);
                int null = (s->token == SQL_NOT_NULL) ? 0 : 1;
 
+
+               if (!c) 
+                       return sql_error(sql, 02, "column '%s' not found\n", 
cname);
                mvc_null(sql, c, null);
                res = stmt_none();
        }
@@ -1512,6 +1518,8 @@
        {
                char *cname = s->data.sval;
                sql_column *c = mvc_bind_column(sql, t, cname);
+               if (!c) 
+                       return sql_error(sql, 02, "column '%s' not found\n", 
cname);
                mvc_drop_default(sql,c);
 
                res = stmt_none();


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to