diff options
author | Sergei Golubchik <serg@mysql.com> | 2009-10-12 20:15:10 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mysql.com> | 2009-10-12 20:15:10 +0200 |
commit | 285257f7c8c3d9e00811c7713323586ad36a832d (patch) | |
tree | 6cf6d0cc21df72e4f86115665668f1e7d9fbed5f /sql/sql_plugin.cc | |
parent | 4337c3808f32c0851b7b9e6efb2516302d691bf8 (diff) | |
download | mariadb-git-285257f7c8c3d9e00811c7713323586ad36a832d.tar.gz |
bug#33731 - INSTALL/UNINSTALL PLUGIN: Inconsistent handling of identifier case
indexed column in mysql.plugin table should use case-insensitive collation
for index lookups to work
(backport from 6.0)
sql/sql_plugin.cc:
generate the key correctly using key_copy.
field->store() stores the value in record format, not key format.
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r-- | sql/sql_plugin.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 025c8a8248d..4e0b4b4d07b 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1764,12 +1764,13 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) reap_plugins(); pthread_mutex_unlock(&LOCK_plugin); + uchar user_key[MAX_KEY_LENGTH]; table->use_all_columns(); table->field[0]->store(name->str, name->length, system_charset_info); - if (! table->file->index_read_idx_map(table->record[0], 0, - (uchar *)table->field[0]->ptr, - HA_WHOLE_KEY, - HA_READ_KEY_EXACT)) + key_copy(user_key, table->record[0], table->key_info, + table->key_info->key_length); + if (! table->file->index_read_idx_map(table->record[0], 0, user_key, + HA_WHOLE_KEY, HA_READ_KEY_EXACT)) { int error; /* |