Commit 11d36cab authored by unknown's avatar unknown

Bug#6776

  Failure to delete rows from mysql.func table caused by missing
  charset conversion for index read by pk.


sql/sql_udf.cc:
  Bug#6776
    Have to use Field store() methods for charset conversion
parent abd8200f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment