Fix warning VS2017 15.7 update.

This previously unreported warning comes from casting size_t to ulong
in sql_hset.h in Hash_Set::at().

Change my_hash_element to accept size_t index parameter.
This commit is contained in:
Vladislav Vaintroub 2018-05-09 23:04:18 +01:00
parent df420cbbfd
commit 8ba0eea65c
2 changed files with 2 additions and 2 deletions

View file

@ -73,7 +73,7 @@ my_bool my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset,
uint flags);
void my_hash_free(HASH *tree);
void my_hash_reset(HASH *hash);
uchar *my_hash_element(HASH *hash, ulong idx);
uchar *my_hash_element(HASH *hash, size_t idx);
uchar *my_hash_search(const HASH *info, const uchar *key, size_t length);
uchar *my_hash_search_using_hash_value(const HASH *info,
my_hash_value_type hash_value,

View file

@ -748,7 +748,7 @@ my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key,
}
uchar *my_hash_element(HASH *hash, ulong idx)
uchar *my_hash_element(HASH *hash, size_t idx)
{
if (idx < hash->records)
return dynamic_element(&hash->array,idx,HASH_LINK*)->data;