summaryrefslogtreecommitdiff
path: root/mysys/lf_hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/lf_hash.c')
-rw-r--r--mysys/lf_hash.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mysys/lf_hash.c b/mysys/lf_hash.c
index a7553b349de..ca3a377190f 100644
--- a/mysys/lf_hash.c
+++ b/mysys/lf_hash.c
@@ -111,13 +111,16 @@ retry:
cur_hashnr= cursor->curr->hashnr;
cur_keylen= cursor->curr->keylen;
- cur_key= cursor->curr->key;
+ cur_key= my_atomic_loadptr_explicit((void **) &cursor->curr->key,
+ MY_MEMORY_ORDER_ACQUIRE);
do {
- link= cursor->curr->link;
+ link= (intptr) my_atomic_loadptr_explicit((void **) &cursor->curr->link,
+ MY_MEMORY_ORDER_RELAXED);
cursor->next= PTR(link);
lf_pin(pins, 0, cursor->next);
- } while (link != cursor->curr->link && LF_BACKOFF);
+ } while (link != (intptr) my_atomic_loadptr((void *) &cursor->curr->link)
+ && LF_BACKOFF);
if (!DELETED(link))
{