summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r--sql/sql_plugin.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index bc3e3cf0b05..0344ce2fbb0 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -128,7 +128,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 *));
@@ -144,7 +144,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));
}
static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
@@ -295,7 +295,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)
@@ -369,14 +369,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);
}
@@ -426,7 +426,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 *));
@@ -481,7 +481,7 @@ static my_bool plugin_add(const LEX_STRING *name, const LEX_STRING *dl, int repo
if (! (tmp_plugin_ptr= plugin_insert_or_reuse(&tmp)))
goto err;
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))
{
tmp_plugin_ptr->state= PLUGIN_IS_FREED;
goto err;
@@ -546,7 +546,7 @@ void plugin_deinitialize(struct st_plugin_int *plugin)
static void plugin_del(struct st_plugin_int *plugin)
{
DBUG_ENTER("plugin_del(plugin)");
- hash_delete(&plugin_hash[plugin->plugin->type], (byte*)plugin);
+ hash_delete(&plugin_hash[plugin->plugin->type], (uchar*)plugin);
plugin_dl_del(&plugin->plugin_dl->dl);
plugin->state= PLUGIN_IS_FREED;
plugin_array_version++;
@@ -633,12 +633,12 @@ err:
DBUG_RETURN(1);
}
-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);
}
@@ -738,11 +738,11 @@ my_bool plugin_register_builtin(struct st_mysql_plugin *plugin)
tmp.ref_count= 1;
tmp.plugin_dl= 0;
- if (insert_dynamic(&plugin_array, (gptr)&tmp))
+ if (insert_dynamic(&plugin_array, (uchar*)&tmp))
DBUG_RETURN(1);
if (my_hash_insert(&plugin_hash[plugin->type],
- (byte*)dynamic_element(&plugin_array,
+ (uchar*)dynamic_element(&plugin_array,
plugin_array.elements - 1,
struct st_plugin_int *)))
DBUG_RETURN(1);
@@ -772,7 +772,7 @@ void plugin_load(void)
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;
@@ -945,7 +945,7 @@ my_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;