hi~
i'm trying to write a simple multithread client program on turbo linux.just to
manipulate some tables in mysql.but i encounter a confusing problem.
the main thread of the program is just to insert data to table A continuously which
has an auto_increment field named ID. after each insertion, i use last_insert_id() to
get the new ID value.
At the same time,the main thread will create a thread occasionally when some
conditions are met. what the new thread do is only to drop some other table B and then
exit.
but when the program is running, sometimes the last_insert_id() returns 0 although the
corresponding insertion succeeded, sometimes the drop table query of the new thread
fails,and the error message is "Error: 2013 (Lost connection to MySQL server during
query)".
what's wrong? i've heard something about mysqlclient_r or mysql thread_safe client
library, do i have to use them? then how? please help
please mail your reply to me: [EMAIL PROTECTED]
thanks!
P.S.
in my program, each thread has an exclusive connection to mysql server.
===============================================
TOM163 �� �� �� �� �� �� �� ��
��һ�ͣ�����������Ϸ����
�ڶ��ͣ��ֻ�����Ϸ����
�����ͣ����ԡ������������������ͷ
���������
http��http://chat.163.net/fsb/top10.html
����V I P . 1 6 3 . N E T
�� �� �� �� �� �� �� �� E-mail �� ��
===============================================
---------------------------------------------------------------------
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