List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:November 27 2008 2:30am
Subject:Re: Connections using MultiResultsOption
View as plain text  
Nick Hastings wrote:
>> I also ran the above under strace, and it seems that .my.cnf is never
>> read when MultiResultsOption is not set.
> Anyone care to try this on their machine?

Sorry for the long time in getting back to you on this.  I just tried it 
and verified it.  You can fix it like this:

con.set_option(new mysqlpp::ReadDefaultFileOption("/home/foo/.my.cnf"));

Call that before you call con.connect(), and it'll work.

I don't think this is a MySQL++ bug.  It seems to just be a weird 
limitation of the C API.  It's not even as simple as the C API resetting 
the default value for the ReadDefaultFileOption, because you can set it 
*before* you set MultiResultsOption, and this still works.  Once you've 
set ReadDefaultFileOption explicitly instead of relying on the default 
behavior, all is well.  If I were you, I'd file this as a bug with 
MySQL, Inc., on libmysqlclient.
Connections using MultiResultsOptionNick Hastings24 Jul
  • Re: Connections using MultiResultsOptionWarren Young24 Jul
    • Re: Connections using MultiResultsOptionNick Hastings24 Jul
      • Re: Connections using MultiResultsOptionNick Hastings25 Jul
        • Re: Connections using MultiResultsOptionWarren Young27 Nov
          • Re: Connections using MultiResultsOptionNick Hastings27 Nov