Hi, Kristofer!
On Apr 21, Kristofer Pettersson wrote:
> #At file:///home/thek/Development/cpp/mysqlbzr/51-bug19027/ based on
> revid:kristofer.pettersson@stripped
>
> 2838 Kristofer Pettersson 2009-04-21
> Bug#19027 MySQL 5.0 starts even with Fatal InnoDB errors
Pardon me, 210K ???
It was supposed to be a small patch.
Let me see...
> === modified file 'client/mysql_upgrade.c'
> --- a/client/mysql_upgrade.c 2009-03-20 14:27:53 +0000
> +++ b/client/mysql_upgrade.c 2009-04-21 13:23:10 +0000
> @@ -60,43 +60,43 @@ static struct my_option my_long_options[
> {"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
> NO_ARG, 0, 0, 0, 0, 0, 0},
> {"basedir", 'b', "Not used by mysql_upgrade. Only for backward compatibilty",
> - 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
> + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0, 0},
Okay, I see.
Don't modify my_getopt, it's part of the public API.
You cannot alter the layout of my_long_options structure.
> === modified file 'sql/sql_plugin.cc'
> --- a/sql/sql_plugin.cc 2009-03-16 10:37:13 +0000
> +++ b/sql/sql_plugin.cc 2009-04-21 13:23:10 +0000
> @@ -2915,33 +2935,39 @@ static int construct_options(MEM_ROOT *m
> if (*p == '_')
> *p= '-';
>
> - if (can_disable)
> - {
> - strxmov(name + namelen*2 + 10, "Enable ", plugin_name, " plugin. "
> - "Disable with --skip-", name," (will save memory).", NullS);
> - /*
> - Now we have namelen * 2 + 10 (one char unused) + 7 + namelen + 9 +
> - 20 + namelen + 20 + 1 == namelen * 4 + 67.
> - */
> + options[1].name= (options[0].name= name) + namelen + 1;
> + options[0].id= options[1].id= 256; /* must be >255. dup id ok */
> + options[0].var_type= options[1].var_type= GET_ENUM;
> + options[0].arg_type= options[1].arg_type= OPT_ARG;
okay, this is the fix - and practically that's all you had to do.
Please, recommit without the other 209K of changes.
> +
> + bool will_disable_by_default=
> + !(my_strcasecmp(&my_charset_latin1, name, "federated") &&
> + my_strcasecmp(&my_charset_latin1, name, "ndbcluster"));
Regards / Mit vielen Grüßen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Häring