diff options
author | unknown <jani@linux-th5m.site> | 2007-05-24 15:26:10 +0300 |
---|---|---|
committer | unknown <jani@linux-th5m.site> | 2007-05-24 15:26:10 +0300 |
commit | 6356f5631c1b6dab40b747abe54797f1779aef80 (patch) | |
tree | 95c9c78dd2df7c497babc3d932ae30ceb98d1296 /sql/sql_udf.cc | |
parent | 7932fb543241d77c0f10e172d144273e3c640512 (diff) | |
parent | 6e849907977dd503ad82b9aa5039d17b5db1d7b7 (diff) | |
download | mariadb-git-6356f5631c1b6dab40b747abe54797f1779aef80.tar.gz |
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into linux-th5m.site:/home/my/mysql-5.1-marvel
include/keycache.h:
Auto merged
include/my_sys.h:
Auto merged
mysys/my_static.c:
Auto merged
sql/handler.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
storage/blackhole/ha_blackhole.cc:
Auto merged
storage/blackhole/ha_blackhole.h:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/mi_check.c:
Auto merged
storage/myisam/mi_preload.c:
Auto merged
mysys/mf_keycache.c:
Manual merge from main 5.1
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r-- | sql/sql_udf.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index 505f7a9a765..20ce614f361 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -92,12 +92,12 @@ static char *init_syms(udf_func *tmp, char *nm) } -extern "C" byte* get_hash_key(const byte *buff,uint *length, +extern "C" uchar* get_hash_key(const uchar *buff, size_t *length, my_bool not_used __attribute__((unused))) { udf_func *udf=(udf_func*) buff; *length=(uint) udf->name.length; - return (byte*) udf->name.str; + return (uchar*) udf->name.str; } @@ -137,7 +137,7 @@ void udf_init() new_thd->store_globals(); new_thd->set_db(db, sizeof(db)-1); - bzero((gptr) &tables,sizeof(tables)); + bzero((uchar*) &tables,sizeof(tables)); tables.alias= tables.table_name= (char*) "func"; tables.lock_type = TL_READ; tables.db= db; @@ -267,7 +267,7 @@ static void del_udf(udf_func *udf) DBUG_ENTER("del_udf"); if (!--udf->usage_count) { - hash_delete(&udf_hash,(byte*) udf); + hash_delete(&udf_hash,(uchar*) udf); using_udf_functions=udf_hash.records != 0; } else @@ -281,7 +281,7 @@ static void del_udf(udf_func *udf) uint name_length=udf->name.length; udf->name.str=(char*) "*"; udf->name.length=1; - hash_update(&udf_hash,(byte*) udf,(byte*) name,name_length); + hash_update(&udf_hash,(uchar*) udf,(uchar*) name,name_length); } DBUG_VOID_RETURN; } @@ -301,7 +301,7 @@ void free_udf(udf_func *udf) We come here when someone has deleted the udf function while another thread still was using the udf */ - hash_delete(&udf_hash,(byte*) udf); + hash_delete(&udf_hash,(uchar*) udf); using_udf_functions=udf_hash.records != 0; if (!find_udf_dl(udf->dl)) dlclose(udf->dlhandle); @@ -327,7 +327,7 @@ udf_func *find_udf(const char *name,uint length,bool mark_used) else rw_rdlock(&THR_LOCK_udf); /* Called during parsing */ - if ((udf=(udf_func*) hash_search(&udf_hash,(byte*) name, + if ((udf=(udf_func*) hash_search(&udf_hash,(uchar*) name, length ? length : (uint) strlen(name)))) { if (!udf->dlhandle) @@ -374,7 +374,7 @@ static udf_func *add_udf(LEX_STRING *name, Item_result ret, char *dl, tmp->returns = ret; tmp->type = type; tmp->usage_count=1; - if (my_hash_insert(&udf_hash,(byte*) tmp)) + if (my_hash_insert(&udf_hash,(uchar*) tmp)) return 0; using_udf_functions=1; return tmp; @@ -427,7 +427,7 @@ int mysql_create_function(THD *thd,udf_func *udf) thd->clear_current_stmt_binlog_row_based(); rw_wrlock(&THR_LOCK_udf); - if ((hash_search(&udf_hash,(byte*) udf->name.str, udf->name.length))) + if ((hash_search(&udf_hash,(uchar*) udf->name.str, udf->name.length))) { my_error(ER_UDF_EXISTS, MYF(0), udf->name); goto err; @@ -533,7 +533,7 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) thd->clear_current_stmt_binlog_row_based(); rw_wrlock(&THR_LOCK_udf); - if (!(udf=(udf_func*) hash_search(&udf_hash,(byte*) udf_name->str, + if (!(udf=(udf_func*) hash_search(&udf_hash,(uchar*) udf_name->str, (uint) udf_name->length))) { my_error(ER_FUNCTION_NOT_DEFINED, MYF(0), udf_name->str); @@ -557,7 +557,7 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) table->use_all_columns(); table->field[0]->store(exact_name_str, exact_name_len, &my_charset_bin); 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; |