linux multithreaded client - mysql
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > linux multithreaded client - mysql




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    linux multithreaded client - mysql  
darren


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-30-04 11:02 PM

Hi all,

I am writing a multi-threaded client that requires shared access to a single
MySQL
connection. The environment is Redhat 7.3 with the patched
mysql-3.23.58-2.71.i386.rpm
installed and compiled with -l libmysqlclient_r.

The connection is made from the main thread and a MYSQL_RES* myres declared
from the child
thread is used to fetch results back to the thread. I get a Segmentation
fault the first
instance my child thread (only one) accesses MYSQL_RES through
mysql_num_rows(myres).
(gdb informed me that this is due to  mysql_num_rows from
libmysqlclient_r.so.10)

I have read a few docs about writing mysql multi-threaded clients and have
called
my_init() in my main prog and my_thread_init() at the first line of my
thread handler.

Any ideas?








[ Post a follow-up to this message ]



    Re: linux multithreaded client - mysql  
Vikram


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-01-04 08:20 AM

"darren" <teodarren@myrealbox.com> wrote in message news:<40e2dbf2$1@news.starhub.net.sg>...

> Hi all,
>
> I am writing a multi-threaded client that requires shared access to a sing
le
> MySQL
> connection. The environment is Redhat 7.3 with the patched
> mysql-3.23.58-2.71.i386.rpm
> installed and compiled with -l libmysqlclient_r.
>
> The connection is made from the main thread and a MYSQL_RES* myres declare
d
> from the child
> thread is used to fetch results back to the thread. I get a Segmentation
> fault the first
> instance my child thread (only one) accesses MYSQL_RES through
> mysql_num_rows(myres).
> (gdb informed me that this is due to  mysql_num_rows from
> libmysqlclient_r.so.10)
>
> I have read a few docs about writing mysql multi-threaded clients and have
> called
> my_init() in my main prog and my_thread_init() at the first line of my
> thread handler.
>
> Any ideas?

It would be better if you ask the question in mailing.database.mysql
group as its more specific to MySQL.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:24 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register