List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:February 7 2008 10:28pm
Subject:Re: possible bug in rc3 ?
View as plain text  
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
Thread
possible bug in rc3 ?Thomas Werth7 Feb
  • Re: possible bug in rc3 ?Warren Young7 Feb
    • Re: possible bug in rc3 ?Thomas Werth8 Feb
      • Re: possible bug in rc3 ?Warren Young9 Feb
        • Re: possible bug in rc3 ?Thomas Werth11 Feb
          • Re: possible bug in rc3 ?Thomas Werth11 Feb
            • Re: possible bug in rc3 ?Warren Young12 Feb
              • Re: possible bug in rc3 ?Thomas Werth12 Feb