diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-06-28 22:01:55 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-06-28 22:01:55 +0200 |
commit | 3361aee591b1eb8c676f60887ffc535cd509890a (patch) | |
tree | 54a65f83ba7d9293e6f8e8281ad920fbae6eb823 /storage/xtradb/buf/buf0lru.cc | |
parent | 6ce20fb2b9fe57330c797694b9dbea4028f40d7c (diff) | |
parent | 0fdb17e6c3f50ae22eb97b6363bcbd8b0cd9e040 (diff) | |
download | mariadb-git-3361aee591b1eb8c676f60887ffc535cd509890a.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'storage/xtradb/buf/buf0lru.cc')
-rw-r--r-- | storage/xtradb/buf/buf0lru.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/storage/xtradb/buf/buf0lru.cc b/storage/xtradb/buf/buf0lru.cc index b36136e4079..fdec0e48198 100644 --- a/storage/xtradb/buf/buf0lru.cc +++ b/storage/xtradb/buf/buf0lru.cc @@ -607,6 +607,7 @@ rescan: bpage != NULL; bpage = prev) { + ut_ad(!must_restart); ut_a(buf_page_in_file(bpage)); /* Save the previous link because once we free the @@ -624,9 +625,6 @@ rescan: /* Remove was unsuccessful, we have to try again by scanning the entire list from the end. - This also means that we never released the - flush list mutex. Therefore we can trust the prev - pointer. buf_flush_or_remove_page() released the flush list mutex but not the LRU list mutex. Therefore it is possible that a new page was @@ -643,6 +641,11 @@ rescan: iteration. */ all_freed = false; + if (UNIV_UNLIKELY(must_restart)) { + + /* Cannot trust the prev pointer */ + break; + } } else if (flush) { /* The processing was successful. And during the @@ -650,12 +653,9 @@ rescan: when calling buf_page_flush(). We cannot trust prev pointer. */ goto rescan; - } else if (UNIV_UNLIKELY(must_restart)) { - - ut_ad(!all_freed); - break; } + ut_ad(!must_restart); ++processed; /* Yield if we have hogged the CPU and mutexes for too long. */ @@ -666,6 +666,11 @@ rescan: /* Reset the batch size counter if we had to yield. */ processed = 0; + } else if (UNIV_UNLIKELY(must_restart)) { + + /* Cannot trust the prev pointer */ + all_freed = false; + break; } #ifdef DBUG_OFF |