Hi!
First, please don't email things directly to me or to the announce list. The best way to get help for a problem, is to write an email only to [EMAIL PROTECTED]; In the future, please also change the subject line to something that is appropriate and don't respond to an email that has nothing to do with the problem! >>>>> "Huang-Ming" == Huang-Ming <[EMAIL PROTECTED]> writes: Huang-Ming> Hello, Huang-Ming> I'm encountering a serious program fault at using MySQL Win32 client library Huang-Ming> LIBMYSQL.DLL. Huang-Ming> I found LIBMYSQL.DLL not thread-safe. When 10 threads are launched to run Huang-Ming> the following two blocks of C statements, very quickly a program fault Huang-Ming> window pops up to LIBMYSQL.DLL. Huang-Ming> ---- block #1 ----- Huang-Ming> EnterCriticalSection(&dcs); Huang-Ming> mysql_real_query(db,stmt,strlen(stmt)); Huang-Ming> res=mysql_store_result(db); Huang-Ming> LeaveCriticalSection(&dcs); Huang-Ming> ---- block #1 ----- (in another C function) Huang-Ming> EnterCriticalSection(&dcs); Huang-Ming> row=mysql_fetch_row(res); Huang-Ming> nfld=mysql_num_fields(res); Huang-Ming> flds=mysql_fetch_fields(res); Huang-Ming> LeaveCriticalSection(&dcs); If this block is done by another thread that did the original query, you will get a problem if you didn't initialize the thread for MySQL usage. Please read the MySQL manual section 'Threaded clients' and the documentation for the MySQL API 'mysql_thread_init()' or more information about 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