Index: openacs-4/packages/acs-tcl/tcl/security-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs-oracle.xql,v
diff -u -N -r1.6 -r1.7
--- openacs-4/packages/acs-tcl/tcl/security-procs-oracle.xql 28 Aug 2003 09:41:43 -0000 1.6
+++ openacs-4/packages/acs-tcl/tcl/security-procs-oracle.xql 30 Jun 2015 21:14:52 -0000 1.7
@@ -78,7 +78,16 @@
property_name = :name
-
+
+
+
+ begin
+ sec_session_property.upsert(:session_id, :module, :name, :value, :secure, :last_hit);
+ end;
+
+
+
+
update users
Index: openacs-4/packages/acs-tcl/tcl/security-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs-postgresql.xql,v
diff -u -N -r1.11 -r1.12
--- openacs-4/packages/acs-tcl/tcl/security-procs-postgresql.xql 17 Sep 2007 09:43:56 -0000 1.11
+++ openacs-4/packages/acs-tcl/tcl/security-procs-postgresql.xql 30 Jun 2015 21:14:52 -0000 1.12
@@ -14,6 +14,15 @@
property_name = :name
+
+
+
+ begin
+ PERFORM sec_session_property__upsert(:session_id, :module, :name, :value, :secure, :last_hit);
+ return 1;
+ end;
+
+
Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v
diff -u -N -r1.77 -r1.78
--- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 27 Jun 2015 17:32:40 -0000 1.77
+++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 30 Jun 2015 21:14:52 -0000 1.78
@@ -1364,30 +1364,38 @@
set last_hit [ns_time]
- db_transaction {
+ if { $clob == "t" } {
- # DRB: Older versions of this code did a delete/insert pair in an attempt
- # to guard against duplicate insertions. This didn't work if there was
- # no value for this property in the table and two transactions ran in
- # parallel. The problem is that without an existing row the delete had
- # nothing to lock on, thus allowing the two inserts to conflict. This
- # was discovered on a page built of frames, where the two requests from
- # the browser spawned two AOLserver threads to service them.
+ db_transaction {
- # Oracle doesn't allow a RETURNING clause on an insert with a
- # subselect, so this code first inserts a dummy value if none exists
- # (ensuring it does exist afterwards) then updates it with the real
- # value. Ugh.
+ # DRB: Older versions of this code did a delete/insert pair in an attempt
+ # to guard against duplicate insertions. This didn't work if there was
+ # no value for this property in the table and two transactions ran in
+ # parallel. The problem is that without an existing row the delete had
+ # nothing to lock on, thus allowing the two inserts to conflict. This
+ # was discovered on a page built of frames, where the two requests from
+ # the browser spawned two AOLserver threads to service them.
- set clob_update_dml [db_map prop_update_dml_clob]
+ # Oracle doesn't allow a RETURNING clause on an insert with a
+ # subselect, so this code first inserts a dummy value if none exists
+ # (ensuring it does exist afterwards) then updates it with the real
+ # value. Ugh.
- db_dml prop_insert_dml ""
+ set clob_update_dml [db_map prop_update_dml_clob]
- if { $clob == "t" && $clob_update_dml ne "" } {
- db_dml prop_update_dml_clob "" -clobs [list $value]
- } else {
- db_dml prop_update_dml ""
+ db_dml prop_insert_dml ""
+
+ if { $clob_update_dml ne "" } {
+ db_dml prop_update_dml_clob "" -clobs [list $value]
+ } else {
+ db_dml prop_update_dml ""
+ }
}
+ } else {
+ #
+ # Perform an upsert operation via stored procedure
+ #
+ db_exec_plsql prop_upsert {}
}
}