Commit 8ba0eea6 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

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.
parent df420cbb
...@@ -73,7 +73,7 @@ my_bool my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset, ...@@ -73,7 +73,7 @@ my_bool my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset,
uint flags); uint flags);
void my_hash_free(HASH *tree); void my_hash_free(HASH *tree);
void my_hash_reset(HASH *hash); 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(const HASH *info, const uchar *key, size_t length);
uchar *my_hash_search_using_hash_value(const HASH *info, uchar *my_hash_search_using_hash_value(const HASH *info,
my_hash_value_type hash_value, my_hash_value_type hash_value,
......
...@@ -748,7 +748,7 @@ my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key, ...@@ -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) if (idx < hash->records)
return dynamic_element(&hash->array,idx,HASH_LINK*)->data; return dynamic_element(&hash->array,idx,HASH_LINK*)->data;
......
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