Hi,

I was hoping someone could help us understand what's happening below.

We use the nsdbpg driver to access our main PostgreSQL database, but we
have a requirement to occasionally access a MysQL server database also.

We thought Tcl8.6's tdbc might be an easy way to do this... and it does
work, but after loading the module under NaviServer, if we try to update
the definition of any procs within the current interpreters (which we do
via ns_eval -sync source ..... ) we are encountering the error
"::tdbc::mysql::connection
does not refer to an object."

A demo test case of the error would be something like the following.

Everything else seems to work as expected and we can carry on using the
system, but we are obviously concerned that there's something going wrong.
Should tdbc::mysql function correctly under NaviServer?

# uname -a
Linux stretch 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64
GNU/Linux
#  cat /etc/debian_version
9.9
# apt-cache policy tcl8.6
tcl8.6:
  Installed: 8.6.6+dfsg-1+b1
  Candidate: 8.6.6+dfsg-1+b1
  Version table:
 *** 8.6.6+dfsg-1+b1 500
        500 http://ftp.uk.debian.org/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status

$ hg clone https://bitbucket.org/naviserver/naviserver
$ cd naviserver
$ ./autogen.sh --disable-ipv6 --with-tcl=/usr/lib/tcl8.6 --enable-rpath
--enable-threads --enable-symbols
$ make
$ make install
$ apt-get install tcl8.6-tdbc tcl8.6-tdbc-mysql
$ chown -R nsadmin:nsadmin /usr/local/ns/logs
$ /usr/local/ns/bin/nsd -u nsadmin -t /usr/local/ns/conf/nsd-config.tcl -c

% package require tdbc
1.0.4
% package require tdbc::mysql
1.0.4
% ns_eval source /usr/local/ns/tcl/file.tcl
[03/May/2019:15:11:10][17859.7f24c7ae5700][-command-] Notice: tcl[default]:
enabletclpages for {GET HEAD POST} requests
[03/May/2019:15:11:10][17859.7f24b57fa700][-ns_eval_q:default:0] Notice:
tcl[default]: enabletclpages for {GET HEAD POST} requests
% [03/May/2019:15:11:10][17859.7f24b57fa700][-ns_job_0-] Notice: update
interpreter to epoch 3, trace deallocate, time 0.000054 secs
[03/May/2019:15:11:10][17859.7f24b57fa700][-ns_job_0-] Error:
::tdbc::mysql::connection does not refer to an object
::tdbc::mysql::connection does not refer to an object
    while executing
"load {} Tdbcmysql"
    invoked from within
"ns_ictl update"
    (procedure "ns_cleanup" line 8)
    invoked from within
"ns_cleanup"
    while executing callback
ns:tcltrace ns_cleanup
(context: trace proc)
[03/May/2019:15:11:10][17859.7f24b57fa700][-ns_job_0-] Error:
::tdbc::mysql::connection does not refer to an object
::tdbc::mysql::connection does not refer to an object
    while executing
"load {} Tdbcmysql"
    invoked from within
"ns_ictl update"
    (procedure "ns_cleanup" line 8)
    invoked from within
"ns_cleanup"
    while executing callback
ns:tcltrace ns_cleanup
(context: trace proc)
(context: trace deallocate)

Regards,
-- 

*David Osborne | Software Engineer*
Qcode Software, Castle House, Fairways Business Park, Inverness, IV2 6AA
*Email:* da...@qcode.co.uk | *Phone:* 01463 896 484
www.qcode.co.uk
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to