Index: openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl,v diff -u -r1.126.2.4 -r1.126.2.5 --- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 28 Mar 2019 21:11:22 -0000 1.126.2.4 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 5 Jun 2019 10:26:31 -0000 1.126.2.5 @@ -525,20 +525,10 @@ return $pool } +if {[acs::icanuse "ns_db currenthandles"]} { -set useNsdbCurrentHandles 0 -try { - ns_db x -} on error {errorMsg} { - if {"currenthandles," in [split $errorMsg " "]} { - ns_log notice "can use 'ns_db currenthandles'" - set useNsdbCurrentHandles 1 - } else { - ns_log notice "cannot use 'ns_db currenthandles'" - } -} + ns_log notice "... I can use 'ns_db currenthandles'" -if {$useNsdbCurrentHandles} { # # This branch uses "ns_db currenthandles" to implement # "db_with_handle" instead of the old approach based on the global @@ -738,6 +728,7 @@ # This is the legacy branch without [ns_db currenthandles], using # the global state variables. # + ns_log notice "... cannot use 'ns_db currenthandles'" ad_proc -public db_with_handle { { -dbn "" }