Hello,
after night, a couple of corrections:
Guilhem Bichot a écrit, Le 02.06.2009 23:46:
> Marc Alff a écrit, Le 28.05.2009 23:33:
>> #At file:///home/malff/BZR-TREE/mysql-6.0-wl4876/ based on
>> revid:marc.alff@stripped
>>
>> 3156 Marc Alff 2009-05-28
>> WL#4876 Parse options before initializing mysys
>
>> +#ifdef HAVE_PERFORMANCE_SCHEMA
>> +extern struct my_option my_long_perfschema_options[];
>> +
>> +my_bool get_one_perfschema_option(int, const struct my_option *, char *)
>> +{
>> + return 0;
>> +}
>
> GB just reuse get_one_plugin_option().
Or change handle_options() to treat a NULL get_one_option parameter as
an empty function. Then empty get_one_option functions around can be
removed (get_one_plugin_options() and get_one_perfschema_option(), I
haven't seen others).
What solution you choose between that and my first suggestion, is up to you.
>> + /* Add back the program name handle_options removes */
>> + argc++;
>> + argv--;
>
> GB If you tweak the MY_INIT() call as explained below, you don't need to
> add back anything, it will be ok to throw away the program's name.
No, I was wrong, sorry. Independently of the tweaking, we need to add
back, otherwise the next handle_options() (in sql_plugin.cc) will, first
thing, skip over the first option (thinking that it's the program's name).
init_server_components(), instead of restoring argv with argv++, rather
passes a copy of the argv pointer to handle_options(). You may want to
do this so that we have a single solution in both places. Up to you.
--
Mr. Guilhem Bichot <guilhem@stripped>
Sun Microsystems / MySQL, Lead Software Engineer
Bordeaux, France
www.sun.com / www.mysql.com