On Fri, 2002-02-01 at 09:12, Matthew T. Kromer wrote:
Harald Koschinski wrote:
MySQLdb-0.9.2a2 is not compiling :-((
intranet:/usr/local/opt/Zope/products/MySQL-python-0.9.2a2 # python
setup.py build
[...]
/usr/i486-suse-linux/bin/ld: cannot find -lmysqlclient_r
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
No Problems with 0.9.1 on the same mashine
But the 0.9.1 you built is a time bomb waiting to blow up on you. If
you don't link with the reentrant mysqlclient libraries your python
adapater isn't thread safe.
I expect you can edit the Setup.py file and change the "use threaded
client libraries" switch to use the non-threaded library. If you do
that and use it in Zope though, you are asking for crashes.
The funny thing is, the "non-thread-safe" libraries are not all that
unsafe. I've done a lot of testing (outside of Zope) of the
non-thread-safe libraries in a threaded environment, and they seem to
work fine. The docs currently say [my comments in brackets]:
....
So as near as I can tell, even using the non-thread-safe library with
Zope *ought* to be safe, so long as multiple threads are not using a
connection at the same time. The most likely explanation for the crashes
people occasionally see is that there is nothing preventing Zope from
simultanous multiple access of the database connection object. If that's
true, ZMySQLDA 2.0.9 ought to fix it. But then I would expect crashes
more often than what actually seems to happen.