From: Warren Young Date: October 15 2009 7:57am Subject: Re: mysqlpp::Connection copy c'tor segfaults List-Archive: http://lists.mysql.com/plusplus/8729 Message-Id: MIME-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Oct 14, 2009, at 9:24 PM, Adam Nielsen wrote: > I'm trying to open a new connection to a MySQL database by > duplicating an > existing connection (as the docs[1] seem to indicate this is an > acceptable > method) however it causes my application to segfault. That's not the purpose of the copy ctor. It exists solely so you can say things like this: void foo() { Connection conn(...parms...); ...do stuff... return conn; } Without a dedicated copy ctor to manage certain under-the-hood details, this would fail. You might look at ConnectionPool, as that centralizes creation of multiple connections, using a common create() method for all.