mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel BitKeeper/etc/ignore: auto-union client/mysql.cc: Auto merged client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged extra/comp_err.c: Auto merged include/decimal.h: Auto merged include/my_getopt.h: Auto merged include/my_global.h: Auto merged include/my_sys.h: Auto merged include/mysql.h: Auto merged mysys/array.c: Auto merged mysys/hash.c: Auto merged mysys/typelib.c: Auto merged sql/derror.cc: Auto merged sql/event_data_objects.cc: Auto merged sql/event_queue.cc: Auto merged sql/field.cc: Auto merged sql/filesort.cc: Auto merged sql/ha_ndbcluster.h: Auto merged sql/ha_ndbcluster_binlog.cc: Auto merged sql/ha_partition.cc: Auto merged sql/ha_partition.h: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_subselect.cc: Auto merged sql/item_sum.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/item_timefunc.h: Auto merged sql/log.cc: Auto merged sql/log_event.cc: Auto merged sql/my_decimal.cc: Auto merged sql/my_decimal.h: Auto merged sql/mysql_priv.h: Auto merged sql/opt_range.cc: Auto merged sql/opt_range.h: Auto merged sql/opt_sum.cc: Auto merged sql/protocol.cc: Auto merged sql/protocol.h: Auto merged sql/rpl_utility.h: Auto merged sql/slave.cc: Auto merged sql/sp.cc: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_connect.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_partition.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_select.h: Auto merged sql/sql_show.cc: Auto merged sql/sql_trigger.cc: Auto merged sql/sql_union.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_view.cc: Auto merged sql/structs.h: Auto merged sql/table.h: Auto merged sql/tztime.cc: Auto merged sql/unireg.cc: Auto merged storage/example/ha_example.cc: Auto merged storage/federated/ha_federated.cc: Auto merged storage/heap/ha_heap.cc: Auto merged storage/innobase/handler/ha_innodb.h: Auto merged storage/myisam/ha_myisam.cc: Auto merged storage/myisam/sort.c: Auto merged storage/myisammrg/ha_myisammrg.cc: Auto merged storage/ndb/tools/restore/consumer_restore.cpp: Auto merged strings/decimal.c: Auto merged strings/strtod.c: Auto merged include/hash.h: Manual merge with 5.1 main tree. mysys/my_getopt.c: Manual merge with 5.1 main tree. sql/field.h: Manual merge with 5.1 main tree. sql/ha_ndbcluster.cc: Manual merge with 5.1 main tree. sql/item_cmpfunc.h: Manual merge with 5.1 main tree. sql/item_create.cc: Manual merge with 5.1 main tree. sql/item_func.h: Manual merge with 5.1 main tree. sql/key.cc: Manual merge with 5.1 main tree. sql/lock.cc: Manual merge with 5.1 main tree. sql/mysqld.cc: Manual merge with 5.1 main tree. sql/set_var.cc: Manual merge with 5.1 main tree. sql/set_var.h: Manual merge with 5.1 main tree. sql/sql_base.cc: Manual merge with 5.1 main tree. sql/sql_handler.cc: Manual merge with 5.1 main tree. sql/sql_insert.cc: Manual merge with 5.1 main tree. sql/sql_plugin.cc: Manual merge with 5.1 main tree. sql/sql_table.cc: Manual merge with 5.1 main tree. sql/sql_yacc.yy: Manual merge with 5.1 main tree. sql/table.cc: Manual merge with 5.1 main tree. storage/innobase/handler/ha_innodb.cc: Manual merge with 5.1 main tree. storage/ndb/src/mgmsrv/InitConfigFileParser.cpp: Manual merge with 5.1 main tree. storage/ndb/tools/restore/restore_main.cpp: Manual merge with 5.1 main tree.
This commit is contained in:
@ -303,7 +303,7 @@ static st_plugin_dl *plugin_dl_insert_or_reuse(struct st_plugin_dl *plugin_dl)
|
||||
DBUG_RETURN(tmp);
|
||||
}
|
||||
}
|
||||
if (insert_dynamic(&plugin_dl_array, (gptr)plugin_dl))
|
||||
if (insert_dynamic(&plugin_dl_array, (uchar*)plugin_dl))
|
||||
DBUG_RETURN(0);
|
||||
DBUG_RETURN(dynamic_element(&plugin_dl_array, plugin_dl_array.elements - 1,
|
||||
struct st_plugin_dl *));
|
||||
@ -319,7 +319,7 @@ static inline void free_plugin_mem(struct st_plugin_dl *p)
|
||||
#endif
|
||||
my_free(p->dl.str, MYF(MY_ALLOW_ZERO_PTR));
|
||||
if (p->version != MYSQL_PLUGIN_INTERFACE_VERSION)
|
||||
my_free((gptr)p->plugins, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free((uchar*)p->plugins, MYF(MY_ALLOW_ZERO_PTR));
|
||||
}
|
||||
|
||||
|
||||
@ -471,7 +471,7 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
|
||||
|
||||
/* Duplicate and convert dll name */
|
||||
plugin_dl.dl.length= dl->length * files_charset_info->mbmaxlen + 1;
|
||||
if (! (plugin_dl.dl.str= my_malloc(plugin_dl.dl.length, MYF(0))))
|
||||
if (! (plugin_dl.dl.str= (char*) my_malloc(plugin_dl.dl.length, MYF(0))))
|
||||
{
|
||||
free_plugin_mem(&plugin_dl);
|
||||
if (report & REPORT_TO_USER)
|
||||
@ -551,14 +551,14 @@ static struct st_plugin_int *plugin_find_internal(const LEX_STRING *name, int ty
|
||||
for (i= 0; i < MYSQL_MAX_PLUGIN_TYPE_NUM; i++)
|
||||
{
|
||||
struct st_plugin_int *plugin= (st_plugin_int *)
|
||||
hash_search(&plugin_hash[i], (const byte *)name->str, name->length);
|
||||
hash_search(&plugin_hash[i], (const uchar *)name->str, name->length);
|
||||
if (plugin)
|
||||
DBUG_RETURN(plugin);
|
||||
}
|
||||
}
|
||||
else
|
||||
DBUG_RETURN((st_plugin_int *)
|
||||
hash_search(&plugin_hash[type], (const byte *)name->str, name->length));
|
||||
hash_search(&plugin_hash[type], (const uchar *)name->str, name->length));
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
@ -676,7 +676,7 @@ static st_plugin_int *plugin_insert_or_reuse(struct st_plugin_int *plugin)
|
||||
DBUG_RETURN(tmp);
|
||||
}
|
||||
}
|
||||
if (insert_dynamic(&plugin_array, (gptr)plugin))
|
||||
if (insert_dynamic(&plugin_array, (uchar*)plugin))
|
||||
DBUG_RETURN(0);
|
||||
DBUG_RETURN(dynamic_element(&plugin_array, plugin_array.elements - 1,
|
||||
struct st_plugin_int *));
|
||||
@ -737,13 +737,12 @@ static bool plugin_add(MEM_ROOT *tmp_root,
|
||||
tmp.name.length= name_len;
|
||||
tmp.ref_count= 0;
|
||||
tmp.state= PLUGIN_IS_UNINITIALIZED;
|
||||
|
||||
if (!test_plugin_options(tmp_root, &tmp, argc, argv, true))
|
||||
{
|
||||
if ((tmp_plugin_ptr= plugin_insert_or_reuse(&tmp)))
|
||||
{
|
||||
plugin_array_version++;
|
||||
if (!my_hash_insert(&plugin_hash[plugin->type], (byte*)tmp_plugin_ptr))
|
||||
if (!my_hash_insert(&plugin_hash[plugin->type], (uchar*)tmp_plugin_ptr))
|
||||
{
|
||||
init_alloc_root(&tmp_plugin_ptr->mem_root, 4096, 4096);
|
||||
DBUG_RETURN(FALSE);
|
||||
@ -832,7 +831,7 @@ static void plugin_del(struct st_plugin_int *plugin)
|
||||
safe_mutex_assert_owner(&LOCK_plugin);
|
||||
/* Free allocated strings before deleting the plugin. */
|
||||
plugin_vars_free_values(plugin->system_vars);
|
||||
hash_delete(&plugin_hash[plugin->plugin->type], (byte*)plugin);
|
||||
hash_delete(&plugin_hash[plugin->plugin->type], (uchar*)plugin);
|
||||
if (plugin->plugin_dl)
|
||||
plugin_dl_del(&plugin->plugin_dl->dl);
|
||||
plugin->state= PLUGIN_IS_FREED;
|
||||
@ -1048,12 +1047,12 @@ err:
|
||||
}
|
||||
|
||||
|
||||
static byte *get_hash_key(const byte *buff, uint *length,
|
||||
static uchar *get_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;
|
||||
return((byte *)plugin->name.str);
|
||||
return((uchar *)plugin->name.str);
|
||||
}
|
||||
|
||||
|
||||
@ -1179,6 +1178,7 @@ int plugin_init(int *argc, char **argv, int flags)
|
||||
/*
|
||||
Now we initialize all remaining plugins
|
||||
*/
|
||||
|
||||
pthread_mutex_lock(&LOCK_plugin);
|
||||
reap= (st_plugin_int **) my_alloca((plugin_array.elements+1) * sizeof(void*));
|
||||
*(reap++)= NULL;
|
||||
@ -1212,6 +1212,7 @@ int plugin_init(int *argc, char **argv, int flags)
|
||||
|
||||
end:
|
||||
free_root(&tmp_root, MYF(0));
|
||||
|
||||
DBUG_RETURN(0);
|
||||
|
||||
err_unlock:
|
||||
@ -1310,7 +1311,7 @@ static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv)
|
||||
new_thd->store_globals();
|
||||
new_thd->db= my_strdup("mysql", MYF(0));
|
||||
new_thd->db_length= 5;
|
||||
bzero((gptr)&tables, sizeof(tables));
|
||||
bzero((uchar*)&tables, sizeof(tables));
|
||||
tables.alias= tables.table_name= (char*)"plugin";
|
||||
tables.lock_type= TL_READ;
|
||||
tables.db= new_thd->db;
|
||||
@ -1672,7 +1673,7 @@ 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,
|
||||
(byte *)table->field[0]->ptr, HA_WHOLE_KEY,
|
||||
(uchar *)table->field[0]->ptr, HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
{
|
||||
int error;
|
||||
|
Reference in New Issue
Block a user