1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
This commit is contained in:
Georgi Kodinov
2010-08-03 19:21:13 +03:00
4 changed files with 18 additions and 13 deletions

View File

@ -327,7 +327,7 @@ DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long long) = { \
#name, comment, check, update, &varname, def, min, max, blk } #name, comment, check, update, &varname, def, min, max, blk }
#define MYSQL_SYSVAR_ENUM(name, varname, opt, comment, check, update, def, typelib) \ #define MYSQL_SYSVAR_ENUM(name, varname, opt, comment, check, update, def, typelib) \
DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long) = { \ DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned int) = { \
PLUGIN_VAR_ENUM | ((opt) & PLUGIN_VAR_MASK), \ PLUGIN_VAR_ENUM | ((opt) & PLUGIN_VAR_MASK), \
#name, comment, check, update, &varname, def, typelib } #name, comment, check, update, &varname, def, typelib }

View File

@ -13,7 +13,6 @@ kill : Bug#37780 2008-12-03 HHunger need some changes to be
lowercase_table3 : Bug#54845 2010-06-30 alik main.lowercase_table3 on Mac OSX lowercase_table3 : Bug#54845 2010-06-30 alik main.lowercase_table3 on Mac OSX
mysqlhotcopy_myisam : bug#54129 2010-06-04 Horst mysqlhotcopy_myisam : bug#54129 2010-06-04 Horst
mysqlhotcopy_archive : bug#54129 2010-06-04 Horst mysqlhotcopy_archive : bug#54129 2010-06-04 Horst
plugin_load : Bug#42144 2009-12-21 alik plugin_load fails
partition_innodb_plugin : Bug#53307 2010-04-30 VasilDimov valgrind warnings partition_innodb_plugin : Bug#53307 2010-04-30 VasilDimov valgrind warnings
query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
sp_sync : Bug#48157 2010-02-06 5.5-m3 demands a differnt solution sp_sync : Bug#48157 2010-02-06 5.5-m3 demands a differnt solution

View File

@ -603,18 +603,24 @@ static int setval(const struct my_option *opts, void *value, char *argument,
}; };
break; break;
case GET_ENUM: case GET_ENUM:
if (((*(uint*)value)=
find_type(argument, opts->typelib, 2) - 1) == (uint)-1)
{ {
/* Accept an integer representation of the enumerated item */ int type= find_type(argument, opts->typelib, 2);
char *endptr; if (type == 0)
uint arg= (uint) strtol(argument, &endptr, 10);
if (*endptr || arg >= opts->typelib->count)
{ {
res= EXIT_ARGUMENT_INVALID; /*
goto ret; Accept an integer representation of the enumerated item.
}; */
*(uint*)value= arg; char *endptr;
uint arg= (uint) strtoul(argument, &endptr, 10);
if (*endptr || arg >= opts->typelib->count)
{
res= EXIT_ARGUMENT_INVALID;
goto ret;
}
*(uint*)value= arg;
}
else
*(uint*)value= type - 1;
} }
break; break;
case GET_SET: case GET_SET:

View File

@ -912,7 +912,7 @@ int ha_example::create(const char *name, TABLE *table_arg,
struct st_mysql_storage_engine example_storage_engine= struct st_mysql_storage_engine example_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION }; { MYSQL_HANDLERTON_INTERFACE_VERSION };
static ulong srv_enum_var= 0; static uint srv_enum_var= 0;
static ulong srv_ulong_var= 0; static ulong srv_ulong_var= 0;
const char *enum_var_names[]= const char *enum_var_names[]=