summaryrefslogtreecommitdiff
path: root/mysys/hash.c
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-10-22 17:08:49 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-10-22 17:08:49 +0300
commit1657b7a583c62deb72267d485bfe201f43909e11 (patch)
treea750e2a44fdd296837b566623331e8a9a707d290 /mysys/hash.c
parentcca75c95bc3c5d0d4a2efb920d3942da3e658654 (diff)
parent9868253b32877554a2707634dc6a6fd79c491053 (diff)
downloadmariadb-git-1657b7a583c62deb72267d485bfe201f43909e11.tar.gz
Merge 10.4 to 10.5
Diffstat (limited to 'mysys/hash.c')
-rw-r--r--mysys/hash.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mysys/hash.c b/mysys/hash.c
index 87d714d6148..abc11b42500 100644
--- a/mysys/hash.c
+++ b/mysys/hash.c
@@ -792,14 +792,13 @@ void my_hash_replace(HASH *hash, HASH_SEARCH_STATE *current_record,
my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
{
uint records, i;
- HASH_LINK *data;
records= hash->records;
- data= dynamic_element(&hash->array,0,HASH_LINK*);
for (i= 0 ; i < records ; i++)
{
- if ((*action)(data[i].data, argument))
+ if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data,
+ argument))
return 1;
}
return 0;