[Commits] c14d9c2: Make sure that sync level vector is emptied.

Jan Lindström jan.lindstrom at mariadb.com
Wed Mar 18 06:25:35 EET 2015


revision-id: c14d9c21f0a6974d9909e00a23522114caad3bfc
parent(s): 99a2c061d7bfc181b04a0adc14ce036fab821d85
committer: Jan Lindström
branch nick: 10.0-git
timestamp: 2015-03-18 06:25:10 +0200
message:

Make sure that sync level vector is emptied.

---
 storage/innobase/sync/sync0sync.cc | 1 +
 storage/xtradb/sync/sync0sync.cc   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/storage/innobase/sync/sync0sync.cc b/storage/innobase/sync/sync0sync.cc
index d00aabd..e62e4e7 100644
--- a/storage/innobase/sync/sync0sync.cc
+++ b/storage/innobase/sync/sync0sync.cc
@@ -1454,6 +1454,7 @@ sync_thread_level_arrays_free(void)
 
 		/* If this slot was allocated then free the slot memory too. */
 		if (slot->levels != NULL) {
+			slot->levels->elems.erase(slot->levels->elems.begin(),slot->levels->elems.end());
 			free(slot->levels);
 			slot->levels = NULL;
 		}
diff --git a/storage/xtradb/sync/sync0sync.cc b/storage/xtradb/sync/sync0sync.cc
index 7e10420..fcc2e01 100644
--- a/storage/xtradb/sync/sync0sync.cc
+++ b/storage/xtradb/sync/sync0sync.cc
@@ -1580,6 +1580,7 @@ sync_thread_level_arrays_free(void)
 
 		/* If this slot was allocated then free the slot memory too. */
 		if (slot->levels != NULL) {
+			slot->levels->elems.erase(slot->levels->elems.begin(),slot->levels->elems.end());
 			free(slot->levels);
 			slot->levels = NULL;
 		}


More information about the commits mailing list