diff options
author | Monty <monty@mariadb.org> | 2016-12-20 13:03:45 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-01-11 09:18:35 +0200 |
commit | ed0bc17bee591599c988df21b8d5a264f08eb885 (patch) | |
tree | b0ecffbdd161e067a10096b3a55099adb2164e0f /mysys/hash.c | |
parent | e80ad58de8bce0923b91c08d12959c42e9e213a5 (diff) | |
download | mariadb-git-ed0bc17bee591599c988df21b8d5a264f08eb885.tar.gz |
Removed usage of my_hash_search() with uninitialized HASH.
- Not documented on intened usage
- Extra checking takes time for all HASH usage
Diffstat (limited to 'mysys/hash.c')
-rw-r--r-- | mysys/hash.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mysys/hash.c b/mysys/hash.c index 2b8130ee47f..1d6b3d5daaa 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -246,13 +246,13 @@ uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { uchar *res; - if (my_hash_inited(hash)) - res= my_hash_first_from_hash_value(hash, - hash->hash_function(hash->charset, key, - length ? length : hash->key_length), - key, length, current_record); - else - res= 0; + DBUG_ASSERT(my_hash_inited(hash)); + + res= my_hash_first_from_hash_value(hash, + hash->hash_function(hash->charset, key, + length ? length : + hash->key_length), + key, length, current_record); return res; } |