Update of /cvsroot/monetdb/sql/src/server
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9949/src/server

Modified Files:
        rel_updates.mx 
Log Message:
propagated changes of Monday Sep 21 2009 - Tuesday Sep 22 2009
from the Aug2009 branch to the development trunk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/09/21 - nielsnes: src/server/rel_updates.mx,1.6.2.1
fixed bug in transaction/rollback with views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: rel_updates.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/rel_updates.mx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- rel_updates.mx      13 Sep 2009 11:23:25 -0000      1.8
+++ rel_updates.mx      22 Sep 2009 11:02:53 -0000      1.9
@@ -157,6 +157,9 @@
        } else if (isView(t)) {
                return sql_error(sql, 02, "INSERT INTO: cannot insert into view 
'%s'", tname);
        }
+       if (t && !isTempTable(t) && STORE_READONLY(active_store_type))
+               return sql_error(sql, 02, "INSERT INTO: insert into table '%s' 
not allowed in readonly mode", tname);
+
        if (!table_privs(sql, t, PRIV_INSERT)) {
                return sql_error(sql, 02, "INSERT INTO: insufficient privileges 
for user '%s' to insert into table '%s'", stack_get_string(sql, 
"current_user"), tname);
        }
@@ -331,6 +334,9 @@
                list *exps = new_exp_list();
                dnode *n;
 
+               if (t && !isTempTable(t) && STORE_READONLY(active_store_type))
+                       return sql_error(sql, 02, "UPDATE: update table '%s' 
not allowed in readonly mode", tname);
+
                if (opt_where) {
                        int status = sql->session->status;
        
@@ -447,6 +453,8 @@
        } else if (isView(t)) {
                return sql_error(sql, 02, "DELETE FROM: cannot delete from view 
'%s'", tname);
        }
+       if (t && !isTempTable(t) && STORE_READONLY(active_store_type))
+               return sql_error(sql, 02, "DELETE FROM: delete from table '%s' 
not allowed in readonly mode", tname);
        if (!table_privs(sql, t, PRIV_DELETE)) {
                return sql_error(sql, 02, "DELETE FROM: insufficient privileges 
for user '%s' to delete from table '%s'", stack_get_string(sql, 
"current_user"), tname);
        } else {
@@ -554,6 +562,8 @@
        if (!t) {
                return sql_error(sql, 02, "COPY INTO: no such table '%s'", 
tname);
        }
+       if (t && !isTempTable(t) && STORE_READONLY(active_store_type))
+               return sql_error(sql, 02, "COPY INTO: copy into table '%s' not 
allowed in readonly mode", tname);
        if (files) {
                dnode *n = files->h;
 
@@ -602,6 +612,8 @@
        if (!t) {
                return sql_error(sql, 02, "COPY INTO: no such table '%s'", 
tname);
        }
+       if (t && !isTempTable(t) && STORE_READONLY(active_store_type))
+               return sql_error(sql, 02, "COPY INTO: copy into table '%s' not 
allowed in readonly mode", tname);
        if (files == NULL)
                return sql_error(sql, 02, "COPY INTO: must specify files");
 


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to