From: Warren Young Date: February 7 2008 10:28pm Subject: Re: possible bug in rc3 ? List-Archive: http://lists.mysql.com/plusplus/7437 Message-Id: <47AB8616.9000803@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Thomas Werth wrote: > > Maybe there a bug in current mysql 3.0.0 rc3 ssl code. Does it work with 2.3.2, using the older Connection::enable_ssl() mechanism? The new mechanism isn't functionally much different, just more convoluted, owing to the extra layers of indirection of type-safe options and the new DB driver. > mysqlpp::Connection conn(false); You have exceptions turned off and don't show that you're checking for error codes. How do you know that the option was set successfully? If you get false back from set_option(), you should turn exceptions on and catch the resulting BadOption exception, as it will tell you more about what went wrong. By the way, if you're turning off exceptions because you found MySQL++ too eager to throw them in the past, you might look at it again. Exceptions in v3 are only for truly exceptional conditions now. (And if not, I want a bug report about it! :) ) > conn.set_option( &opSSL ); It's incorrect to pass options allocated on the stack. Connection (DBDriver, actually) needs to control the lifetime of these objects. You want to say: conn.set_option(new SslOption(...)); There's a new section in the user manual that explains all this: http://tangentsoft.net/mysql++/test/doc/userman/tutorial.html#connopts