Hi!

>>>>> "Andrey" == Andrey Kotrekhov <[EMAIL PROTECTED]> writes:

Andrey> -LДобрый день.-A
Andrey> Are mysql know about this!!!
>> 
>> Sorry but if your OS doesn't support gethostbyname_r(), then
>> mysql_real_connect() is not thread safe (I have just updated our
>> documentation about this)

Andrey> Thank you.

I have now also patched the 3.23.51 source to ensure that
gethostbyname() is called in a thread-safe manner.

<cut>

>> For example, have you called mysql_thread_init() before calling
>> mysql_real_connect() in all your threads ?
>> 

Andrey> Hmm... I use mysql_init() in each thread but:

Try calling 'my_thread_init()' instead.

Andrey> 8.4.4.4 my_thread_init()
Andrey> .....
Andrey> This is automatically called by my_init() and mysql_connect().
Andrey> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The above should work if you all your threads calls the above
functions.  If you have a thread that calls mysql_xxx_query()
directly, this will die if you don't call my_thread_init() first.


Andrey> And in manual:
Andrey> To get a threaded client where you can interrupt the client from other
Andrey> threads and set timeouts when talking with the MySQL server, you should
Andrey> use the -lmysys, -lstring, and -ldbug libraries...
Andrey> -lstring - where can I find it?
Andrey> Is it -lmystrings ?

Yes;  I have now updated the manual with this.

Regards,
Monty

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to