From: Warren Young Date: May 15 2009 8:46am Subject: Re: Segfault using thread_start List-Archive: http://lists.mysql.com/plusplus/8565 Message-Id: MIME-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit 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.