diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-04-19 22:27:02 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-04-19 22:31:26 +0200 |
commit | 1a019d08012db7b3fa6a42d39342792c3418e75b (patch) | |
tree | c116066b995f1c7a2d8c11e72aa9fa547a20407b /mysys/lf_hash.c | |
parent | 5e61e1716e763315009318081fba5994b8910242 (diff) | |
parent | c0b4d74b52e7eec9b13af732193f7f8d7abe05de (diff) | |
download | mariadb-git-1a019d08012db7b3fa6a42d39342792c3418e75b.tar.gz |
Merge branch 'mysql/5.5' into 5.5
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 797c20e819e..8d74aaf8cc2 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 @@ -86,7 +86,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)) @@ -100,7 +101,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; |