Andy Dustman wrote:
On 3/29/06, Marcus Grando
Message body follows:
It's true. I talk with mysql developers (Sergei
firstname.lastname@example.org) and today the uniq method to
mysqlclient_r is using mysql_thread_close() after
Look this BUG:
The problem from a Python perspective is, there's
no way to get
mysql_thread_end() called automatically when Python
actually ends a
If you want to try it. edit
_mysql.c and call mysql_thread_end() after closing
I do it. Works fine to me, but...
However one problem I can see with this is if you
connection objects active in the same thread. Plus
can potentially be passed from thread to thread, so
long as only one
thread uses them at a time. (The module is
thread-safe, but are likely
to confuse the wire protocol.) So what happens when
mysql_thread_end() and still have a open connection
I don't know.
For simple use like create threads and each thread
connection and close, call mysql_thread_end() must
work. But complexes
examples like above i don't know.
One idea maybe. Crate one global mutex counter, when
this counter are incremented and on close
decremented. If this counter
is <=3D 1 then mysql_thread_end().
When you call mysql_real_connect or something he
What you think?
Put in a bug and I'll think about it for 1.3.
Log in to post a comment.