summaryrefslogtreecommitdiff
path: root/sql/sql_udf.cc
diff options
context:
space:
mode:
authoracurtis@pcgem.rdg.cyberkinetica.com <>2005-03-07 13:37:10 +0000
committeracurtis@pcgem.rdg.cyberkinetica.com <>2005-03-07 13:37:10 +0000
commit5eb393973f59364915a4cc9a7387f560d7453c5b (patch)
treedd5611c1fee954a969f1a92740889987469839be /sql/sql_udf.cc
parentc99c44805c4104ad885e93a55b0986abfbb1e122 (diff)
downloadmariadb-git-5eb393973f59364915a4cc9a7387f560d7453c5b.tar.gz
Bug#6776
Failure to delete rows from mysql.func table caused by missing charset conversion for index read by pk.
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r--sql/sql_udf.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 0bb8ac8a28b..6566e327a9e 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -493,8 +493,11 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
tables.real_name= tables.alias= (char*) "func";
if (!(table = open_ltable(thd,&tables,TL_WRITE)))
goto err;
- if (!table->file->index_read_idx(table->record[0],0,(byte*) udf_name->str,
- (uint) udf_name->length,
+ table->field[0]->store(udf_name.str, udf_name.length, system_charset_info);
+ table->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
+ if (!table->file->index_read_idx(table->record[0], 0,
+ (byte*) table->field[0]->ptr,
+ table->key_info[0].key_length
HA_READ_KEY_EXACT))
{
int error;