Index: openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl,v diff -u -r1.91 -r1.92 --- openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 7 Jul 2018 10:56:10 -0000 1.91 +++ openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 20 Jan 2019 15:22:58 -0000 1.92 @@ -532,14 +532,14 @@ proc ::xo::at_delete args { # # Delete all object and classes at a time, where the thread is - # fully functioning. During interp exit, the commands would be - # deleted anyhow, but there exists a potential memory leak, when - # e.g. a destroy method (or an exit handler) writes to ns_log. - # ns_log requires the thread name, but it is cleared already - # earlier (after the interp deletion trace). AOLserver recreated - # the name and the an entry in the thread list, but this elements - # will not be freed. If we destroy the objects here, the mentioned - # problem will not occur. + # still fully functioning. During interp exit, the commands would + # be deleted anyhow, but there exists a potential memory leak, + # when e.g. a destroy method (or an exit handler) writes to + # ns_log. ns_log requires the thread name, but it is cleared + # already earlier (after the interp deletion trace). AOLserver + # recreated the name and the an entry in the thread list, but this + # elements will not be freed. If we destroy the objects here, the + # mentioned problem will not occur. # ns_log notice "ON DELETE $args" ::xo::broadcast clear Index: openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl,v diff -u -r1.143 -r1.144 --- openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 11 Nov 2018 16:16:33 -0000 1.143 +++ openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 20 Jan 2019 15:22:58 -0000 1.144 @@ -509,7 +509,8 @@ if {$bind ne ""} {set bindOpt [list -bind $bind]} {set bindOpt ""} set qn [uplevel [list [self] qn $qn]] # - # the prepare in the next line works probably only with inline sql statements + # The prepare statement in the next line works probably only with + # inline sql statements. # #if {[info exists prepare]} {set sql [:prepare -dbn $dbn -argtypes $prepare $sql]} #ns_log notice "### [list ::db_foreach -dbn $dbn $qn $sql $body {*}$bindOpt]" @@ -2608,6 +2609,8 @@ set column_name ${:column_name} set object_type [${:domain} object_type] + #ns_log notice "::xo::db::Attribute create_attribute $object_type $column_name epoch [ns_ictl epoch] [array get ::db_state_default]" + if {[::xo::dc get_value check_att {select 0 from acs_attributes where attribute_name = :column_name and object_type = :object_type} 1]} {