mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into hynda.mysql.fi:/home/my/mysql-5.1-marvel client/mysqldump.c: Auto merged sql/event_db_repository.cc: Auto merged sql/event_queue.cc: Auto merged sql/field.cc: Auto merged sql/item.cc: Auto merged sql/item_subselect.cc: Auto merged sql/log_event.h: Auto merged sql/sp.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_db.cc: Auto merged sql/sql_handler.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_plugin.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/table.h: Auto merged sql/sql_yacc.yy: Manual merge with 5.1 main tree.
This commit is contained in:
@ -1058,8 +1058,12 @@ err:
|
||||
}
|
||||
|
||||
|
||||
static uchar *get_hash_key(const uchar *buff, size_t *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
extern "C" uchar *get_plugin_hash_key(const uchar *, size_t *, my_bool);
|
||||
extern "C" uchar *get_bookmark_hash_key(const uchar *, size_t *, my_bool);
|
||||
|
||||
|
||||
uchar *get_plugin_hash_key(const uchar *buff, size_t *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
{
|
||||
struct st_plugin_int *plugin= (st_plugin_int *)buff;
|
||||
*length= (uint)plugin->name.length;
|
||||
@ -1067,8 +1071,8 @@ static uchar *get_hash_key(const uchar *buff, size_t *length,
|
||||
}
|
||||
|
||||
|
||||
static uchar *get_bookmark_hash_key(const uchar *buff, size_t *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
uchar *get_bookmark_hash_key(const uchar *buff, size_t *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
{
|
||||
struct st_bookmark *var= (st_bookmark *)buff;
|
||||
*length= var->name_len + 1;
|
||||
@ -1115,7 +1119,7 @@ int plugin_init(int *argc, char **argv, int flags)
|
||||
for (i= 0; i < MYSQL_MAX_PLUGIN_TYPE_NUM; i++)
|
||||
{
|
||||
if (hash_init(&plugin_hash[i], system_charset_info, 16, 0, 0,
|
||||
get_hash_key, NULL, HASH_UNIQUE))
|
||||
get_plugin_hash_key, NULL, HASH_UNIQUE))
|
||||
goto err;
|
||||
}
|
||||
|
||||
@ -1702,9 +1706,10 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name)
|
||||
|
||||
table->use_all_columns();
|
||||
table->field[0]->store(name->str, name->length, system_charset_info);
|
||||
if (! table->file->index_read_idx(table->record[0], 0,
|
||||
(uchar *)table->field[0]->ptr, HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
if (! table->file->index_read_idx_map(table->record[0], 0,
|
||||
(uchar *)table->field[0]->ptr,
|
||||
HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
{
|
||||
int error;
|
||||
if ((error= table->file->ha_delete_row(table->record[0])))
|
||||
@ -2769,8 +2774,10 @@ static void plugin_opt_set_limits(struct my_option *options,
|
||||
options->arg_type= OPT_ARG;
|
||||
}
|
||||
|
||||
extern "C" my_bool get_one_plugin_option(int optid, const struct my_option *,
|
||||
char *);
|
||||
|
||||
static my_bool get_one_option(int optid __attribute__((unused)),
|
||||
my_bool get_one_plugin_option(int optid __attribute__((unused)),
|
||||
const struct my_option *opt,
|
||||
char *argument)
|
||||
{
|
||||
@ -3078,7 +3085,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
error= handle_options(argc, &argv, opts, get_one_option);
|
||||
error= handle_options(argc, &argv, opts, get_one_plugin_option);
|
||||
(*argc)++; /* add back one for the program name */
|
||||
|
||||
if (error)
|
||||
@ -3140,7 +3147,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
if (enabled_saved)
|
||||
if (enabled_saved && global_system_variables.log_warnings)
|
||||
sql_print_information("Plugin '%s' disabled by command line option",
|
||||
tmp->name.str);
|
||||
DBUG_RETURN(1);
|
||||
|
Reference in New Issue
Block a user