List:General Discussion« Previous MessageNext Message »
From:terry jones Date:April 12 1999 3:11am
Subject:Opening multiple MySQL connections in one program (with and without threads).
View as plain text  
Thanks for the answer Monty. Here's what happened.

When I rebuilt with --enable-thread-safe-client I got a SEGV on
behavior 1 (as well as 2, 3, 4), making things worse!

However, when I changed my code to use your suggested

   MYSQL *mysql = mysql_init((MYSQL *) 0);

ALL the behaviors worked.


So I am happy, everything seems fine. I don't understand why the
original code didn't work, but then again I don't care too much :-)

BTW I upgraded to redhat 5.2 in the middle there somewhere, which also
didn't help fix the problem. At least things were no different in the
output of my program once I had managed to upgrade.


Thanks again, and to Ed Carp and Aldrian Gintingsuka for their
responses.


Regards,
Terry
Thread
Opening multiple MySQL connections in one program (with and without threads).terry jones12 Apr
  • Re: Opening multiple MySQL connections in one program (with and without threads).Ed Carp12 Apr
  • Re: Opening multiple MySQL connections in one program (with and without threads).terry jones12 Apr
  • Re: Opening multiple MySQL connections in one program (with and without threads).Ed Carp12 Apr
  • Re: Opening multiple MySQL connections in one program (with and without threads).Ed Carp12 Apr
  • Re: Opening multiple MySQL connections in one program (with andwithout threads).Aldrian Gintingsuka12 Apr
  • Opening multiple MySQL connections in one program (with and without threads).Michael Widenius12 Apr
  • Opening multiple MySQL connections in one program (with and without threads).terry jones12 Apr
    • Re: Opening multiple MySQL connections in one program (with andwithout threads).Ilya Obshadko12 Apr
    • Re: Opening multiple MySQL connections in one program (with andwithout threads).terry jones12 Apr
      • Re: Opening multiple MySQL connections in one program (with andwithout threads).Ilya Obshadko12 Apr
      • Re: Opening multiple MySQL connections in one program (with andwithout threads).terry jones13 Apr
  • Re: Opening multiple MySQL connections in one program (with and without threads).Ed Carp13 Apr
  • Re: Opening multiple MySQL connections in one program (with and without threads).terry jones14 Apr