diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-04-20 13:16:03 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-04-20 14:33:24 +0200 |
commit | 587568b72a0f4bcb284b292f158dea6f65c03487 (patch) | |
tree | e9caae1f20e997ce2bc528fc41d1adbe2c2d8bf0 /mysys/lf_hash.c | |
parent | bcb36ee21e2515d17dcf03b760487e64eb780f2b (diff) | |
parent | 51c415d97d60cad732d05c9d5516f7fa3fde1df9 (diff) | |
download | mariadb-git-587568b72a0f4bcb284b292f158dea6f65c03487.tar.gz |
Merge branch '5.5' into 10.0
Diffstat (limited to 'mysys/lf_hash.c')
-rw-r--r-- | mysys/lf_hash.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mysys/lf_hash.c b/mysys/lf_hash.c index 7edf5e3a03d..4daa90e9f57 100644 --- a/mysys/lf_hash.c +++ b/mysys/lf_hash.c @@ -1,5 +1,5 @@ -/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB +/* Copyright (c) 2006, 2018, Oracle and/or its affiliates. + Copyright (c) 2009, 2018, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -84,7 +84,8 @@ retry: do { /* PTR() isn't necessary below, head is a dummy node */ cursor->curr= (LF_SLIST *)(*cursor->prev); _lf_pin(pins, 1, cursor->curr); - } while (*cursor->prev != (intptr)cursor->curr && LF_BACKOFF); + } while (my_atomic_loadptr((void**)cursor->prev) != cursor->curr && + LF_BACKOFF); for (;;) { if (unlikely(!cursor->curr)) @@ -98,7 +99,7 @@ retry: cur_hashnr= cursor->curr->hashnr; cur_key= cursor->curr->key; cur_keylen= cursor->curr->keylen; - if (*cursor->prev != (intptr)cursor->curr) + if (my_atomic_loadptr((void**)cursor->prev) != cursor->curr) { (void)LF_BACKOFF; goto retry; |