List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:May 15 2009 8:46am
Subject:Re: Segfault using thread_start
View as plain text  
On May 14, 2009, at 7:12 PM, Michael wrote:

> it seems like thread_start is not calling mysql_init implicitely, so
> calls to mysqlpp::tgread_start result in a segfault (mysql++ 3.08 on
> FreeBSD7.2).
> Adding
> mysqlpp::Connection() to the beginning of main works as a temporary  
> fix,
> but I think thread_start should somehow verify that  
> mysql_(library)_init
> is called at least once.

Such details are best left to the underlying C library.  The right  
fix, already scheduled for v3.1, is to expose mysql_library_init() and  
mysql_library_end() through DBDriver.  This will also squish the last  
spurious memory leak report from tools like valgrind when using threads.
Thread
Segfault using thread_startMichael15 May
  • Re: Segfault using thread_startWarren Young15 May
    • Re: Segfault using thread_startMichael15 May
      • Re: Segfault using thread_startWarren Young15 May
        • Re: Segfault using thread_startMichael15 May
        • Re: Segfault using thread_startWarren Young15 May
          • Re: Segfault using thread_startMichael15 May
            • Re: Segfault using thread_startWarren Young15 May
              • Re: Segfault using thread_startMichael15 May