Update of /cvsroot/monetdb/sql/src/server
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24317/src/server
Modified Files:
Tag: Aug2009
rel_updates.mx sql_mvc.mx
Log Message:
fixed bug in transaction/rollback with views
U sql_mvc.mx
Index: sql_mvc.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_mvc.mx,v
retrieving revision 1.223.2.2
retrieving revision 1.223.2.3
diff -u -d -r1.223.2.2 -r1.223.2.3
--- sql_mvc.mx 7 Aug 2009 14:26:18 -0000 1.223.2.2
+++ sql_mvc.mx 21 Sep 2009 21:15:20 -0000 1.223.2.3
@@ -489,6 +489,10 @@
assert(m->session->active); /* only abort an active transaction */
store_lock();
+ if (m->qc) {
+ qc_destroy(m->qc);
+ m->qc = qc_create(m->clientid);
+ }
if (name && name[0] != '\0') {
while (tr && (!tr->name || strcmp(tr->name, name) != 0))
tr = tr->parent;
U rel_updates.mx
Index: rel_updates.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/rel_updates.mx,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -d -r1.6 -r1.6.2.1
--- rel_updates.mx 25 Jul 2009 22:08:38 -0000 1.6
+++ rel_updates.mx 21 Sep 2009 21:15:20 -0000 1.6.2.1
@@ -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) {
//list *slist = create_stmt_list();
dnode *n = files->h;
@@ -604,6 +614,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