summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2015-03-18 12:18:39 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2015-03-18 12:18:39 +0200
commit2bdbfd334bba93f75b2952e8e76f20ed29fb2bd4 (patch)
tree99a0fb5045ff5ad0d60e9ec28f805b2dae6258e2 /storage
parentc14d9c21f0a6974d9909e00a23522114caad3bfc (diff)
downloadmariadb-git-2bdbfd334bba93f75b2952e8e76f20ed29fb2bd4.tar.gz
Fix assertion failure seen on Buildbot win32-debug
There is a bug in Visual Studio 2010 Visual Studio has a feature "Checked Iterators". In a debug build, every iterator operation is checked at runtime for errors, e g, out of range. Disable this "Checked Iterators" for Windows and Debug if defined.
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/sync/sync0sync.cc13
-rw-r--r--storage/xtradb/sync/sync0sync.cc13
2 files changed, 26 insertions, 0 deletions
diff --git a/storage/innobase/sync/sync0sync.cc b/storage/innobase/sync/sync0sync.cc
index e62e4e7bc30..2928fb0598b 100644
--- a/storage/innobase/sync/sync0sync.cc
+++ b/storage/innobase/sync/sync0sync.cc
@@ -47,6 +47,19 @@ Created 9/5/1995 Heikki Tuuri
#include "ha_prototypes.h"
#include "my_cpu.h"
+/* There is a bug in Visual Studio 2010
+Visual Studio has a feature "Checked Iterators". In a debug build, every
+iterator operation is checked at runtime for errors, e g, out of range.
+Disable this "Checked Iterators" for Windows and Debug if defined.
+*/
+#ifdef UNIV_DEBUG
+#ifdef __WIN__
+#ifdef _ITERATOR_DEBUG_LEVEL
+#define _ITERATOR_DEBUG_LEVEL 0
+#endif /* _ITERATOR_DEBUG_LEVEL */
+#endif /* __WIN__*/
+#endif /* UNIV_DEBUG */
+
#include <vector>
/*
diff --git a/storage/xtradb/sync/sync0sync.cc b/storage/xtradb/sync/sync0sync.cc
index fcc2e01c1f4..b8766699413 100644
--- a/storage/xtradb/sync/sync0sync.cc
+++ b/storage/xtradb/sync/sync0sync.cc
@@ -48,6 +48,19 @@ Created 9/5/1995 Heikki Tuuri
#include "ha_prototypes.h"
#include "my_cpu.h"
+/* There is a bug in Visual Studio 2010
+Visual Studio has a feature "Checked Iterators". In a debug build, every
+iterator operation is checked at runtime for errors, e g, out of range.
+Disable this "Checked Iterators" for Windows and Debug if defined.
+*/
+#ifdef UNIV_DEBUG
+#ifdef __WIN__
+#ifdef _ITERATOR_DEBUG_LEVEL
+#define _ITERATOR_DEBUG_LEVEL 0
+#endif /* _ITERATOR_DEBUG_LEVEL */
+#endif /* __WIN__*/
+#endif /* UNIV_DEBUG */
+
#include <vector>
/*