Ok, I have a program I am working on, there is probably just something I don't 
understand about the behaviour of the C API and not a bug with MySQL's C api.

I have an app that listens on a specified TCP port, once a user connects and 
successfully authenticates, two more processes are spawned (leaving the 
single original process to accept new connections), one process sits with a 
blocking read() on the tcp socket with the user, and just waits to recieve 
text data from the user, the other process waits till it has text data to 
write() to the user's socket.

This program uses a MySQL backend to manage things like usernames and 
passwords, etc. If the user sends data just for the server, there is no 
problem working with MySQL, if the user recieves data from another user, 
there is still no trouble, but when the user sends data to another user, and 
then makes a request to the server that results in the server calling 
mysql_real_connect(), mysql_real_connect() just hangs indefinately (the 
mysql_init() call prior to the call to mysql_real_connect() appears to work 
fine though).

I really have no idea why either, I've found nothing in the docs or mailing 
list archives that seems anything like the trouble I am experiencing.

Let me try to explain the problem more clearly:
User A recieves data from User B, no MySQL trouble, User A sends data to the 
server, no MySQL trouble, User A sends data to User B, we have trouble (and 
of course, User B has trouble if he sends data to User A).

User A->TCPsocketA->processA read()->processA connect to process B's unix 
socket->processB read() read data from unix socket from processA->
processB write()->TCPsocketB->User B

And this causes mysql_real_connect() to hang if User A makes a request that 
causes the server to attempt to mysql_real_connect.

I've run tcpdump and I've seen that mysql_real_connection seems to work at 
first, there is some talking between the client and MySQL, but then things 
just stop working, I also have this problem if I do a local connection with 
MySQL as well.

Here are my system specs:
mysqld  Ver 3.23.54 for pc-linux-gnu on i686
I've tried with kernel 2.5.59 as well, I'm currently using: 2.4.21-pre3
I have dual pentium III 800 mhz cpu's (133 fsb)
1 GB of pc133 ram

If more info is needed, I will glady provide it.

Thanks.

-Cameron

-------

"Oh what is this test, Knights Who say... Oh Knights who
until recently, said Ni?"



---------------------------------------------------------------------
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