[naviserver-devel] does NsDbLogSql() do anything?

2017-08-28 Thread Andrew Piskorski
NsDbLogSql() is defined in naviserver/nsdb/dbinit.c, and sometimes
calls Ns_Log(Ns_LogSqlDebug).  But at least with the nsoracle driver,
NsDbLogSql() apparently NEVER gets called at all!  (I temporarily put
in Ns_Log calls to be sure.)  Is it supposed to?

After learning about NaviServer's "ns_logctl severity Debug(sql) on"
approach to SQL logging, I fixed nsoracle so that SQL logging actually
works:

  
https://bitbucket.org/naviserver/nsoracle/commits/cf5986c3b2e6ecd5cf9970d4c7ad37f667fc4c62
  http://openacs.org/forums/message-view?message_id=5374519
  
https://bitbucket.org/naviserver/naviserver/src/tip/openacs-config.tcl?fileviewer=file-view-default

But I was surprised that the Ns_log statements that make the SQL
logging happen, are apparently all issued directly by the Oracle
driver.  The generic nsdb layer and NsDbLogSql() don't seem to be
involved at all.  Is that normal for NaviServer database drivers, or
is there something funny about nsoracle?

-- 
Andrew Piskorski 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] Global variables not cloned?!

2017-08-28 Thread Roderick


In naviserver-4.99.15/doc/html/manual/files/tcl-overview.html we read:




Tcl Interpreters

During NaviServer initialization, only one interpreter exists. While 
modules are loaded and initialized, they may add procedures to the 
interpreter. When initialization is complete (all modules are loaded and 
all Tcl libraries have been executed), the interpreter may no longer be 
changed.


Each connection thread that requires Tcl will create a copy of the 
original interpreter.

<<<

That they may add procedures does not exclude that they also may
add global variables.

After some experiments, it seems to me that at some point global
variables in the loaded modules *and* libraries are unset, I suppose
immeadately after modules are loaded and libraries are executed.
Is it true? When it happens? An explicit hint to it in the documentation
would help beginners a lot.

It is a question of taste: I would preffer to decide what variables
to unset and not let the server do it automatically, but it could
be a source of chaos.

Thanks
Rodrigo.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel