mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Portability fixes
Fix bug when using option groups
This commit is contained in:
@ -737,7 +737,7 @@ static void mysql_read_default_options(struct st_mysql_options *options,
|
|||||||
*end=0; /* Remove '=' */
|
*end=0; /* Remove '=' */
|
||||||
}
|
}
|
||||||
/* Change all '_' in variable name to '-' */
|
/* Change all '_' in variable name to '-' */
|
||||||
for (end= *option ; (end= strcend(end,'_')) && *end ; )
|
for (end= *option ; *(end= strcend(end,'_')) ; )
|
||||||
*end= '-';
|
*end= '-';
|
||||||
switch (find_type(*option+2,&option_types,2)) {
|
switch (find_type(*option+2,&option_types,2)) {
|
||||||
case 1: /* port */
|
case 1: /* port */
|
||||||
|
@ -193,7 +193,7 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 'i', 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 'i', 0, 0, 0, 0, 0, 0},
|
||||||
{"keys-used", "Tell MyISAM to update only some specific keys. # is a bit mask of which keys to use. This can be used to get faster inserts!",
|
{"keys-used", "Tell MyISAM to update only some specific keys. # is a bit mask of which keys to use. This can be used to get faster inserts!",
|
||||||
(gptr*) &check_param.keys_in_use, (gptr*) &check_param.keys_in_use, 0,
|
(gptr*) &check_param.keys_in_use, (gptr*) &check_param.keys_in_use, 0,
|
||||||
GET_LL, REQUIRED_ARG, 'k', -1LL, 0, 0, 0, 0, 0},
|
GET_LL, REQUIRED_ARG, 'k',-1, 0, 0, 0, 0, 0},
|
||||||
{"medium-check",
|
{"medium-check",
|
||||||
"Faster than extended-check, but only finds 99.99% of all errors. Should be good enough for most cases.", 0, 0, 0, GET_NO_ARG, NO_ARG, 'm', 0, 0, 0, 0, 0,
|
"Faster than extended-check, but only finds 99.99% of all errors. Should be good enough for most cases.", 0, 0, 0, GET_NO_ARG, NO_ARG, 'm', 0, 0, 0, 0, 0,
|
||||||
0},
|
0},
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#include <my_config.h>
|
|
||||||
#include <my_global.h>
|
#include <my_global.h>
|
||||||
#include <m_string.h>
|
#include <m_string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -452,7 +451,7 @@ static void init_variables(const struct my_option *options)
|
|||||||
{
|
{
|
||||||
if (options->var_type == GET_LONG)
|
if (options->var_type == GET_LONG)
|
||||||
*((long*) options->u_max_value)= *((long*) options->value)=
|
*((long*) options->u_max_value)= *((long*) options->value)=
|
||||||
options->def_value;
|
(long) options->def_value;
|
||||||
else if (options->var_type == GET_LL)
|
else if (options->var_type == GET_LL)
|
||||||
*((longlong*) options->u_max_value)= *((longlong*) options->value)=
|
*((longlong*) options->u_max_value)= *((longlong*) options->value)=
|
||||||
options->def_value;
|
options->def_value;
|
||||||
|
Reference in New Issue
Block a user