Hi!
On Dec 11, Paul DuBois wrote:
> >>>
> The problem is that if you want to put mysql_library_init() before
> load_defaults() in an embedded server program, you cannot pass
> arguments from option files to the embedded server via the argc/argv
> arguments to mysql_library_init().
In that case you don't need to. embedded server calls load_defaults
internally, all you need to do is to pass the list of groups you want to
load.
> Using MY_INIT(), load_defaults(), mysql_library_init() in that order
> seems to be a sequence that will work for normal clients and embedded
> applications. (I am thinking that it's a good idea to have a sequence
> that allows you to use a given program in either way depending on
> which library you like the program against: libmysqlclient vs
> libmysqld.)
Okay, this is a problem.
I'd say you simply pass the correct list of groups to
mysql_library_init() and only use load_defaults() if you want to handle
options that libmysqlclient/libmysqld don't support.
This implies that mysql_library_init() in libmysqlclient needs to
support argv/argc - I've submitted a bugreport about it (bug#33147).
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Developer
/_/ /_/\_, /___/\___\_\___/ MySQL GmbH, Dachauer Str. 37, D-80335 München
<___/ Geschäftsführer: Kaj Arnö - HRB
München 162140