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.