File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -47,14 +47,20 @@ Created 9/5/1995 Heikki Tuuri
47
47
#include " ha_prototypes.h"
48
48
#include " my_cpu.h"
49
49
50
- /* There is a bug in Visual Studio 2010
50
+ /* There is a bug in Visual Studio 2010.
51
51
Visual Studio has a feature "Checked Iterators". In a debug build, every
52
- iterator operation is checked at runtime for errors, e g, out of range.
52
+ iterator operation is checked at runtime for errors, e.g., out of range.
53
+ Because of bug there is runtime error on following code
54
+ for (std::vector<sync_level_t>::iterator it = array->elems.begin(); it !=
55
+ array->elems.end(); ++it) and runtime check fails on comparison
56
+ it != array->elems.end() that is correct and standard way to do end
57
+ of range comparison.
53
58
Disable this "Checked Iterators" for Windows and Debug if defined.
54
59
*/
55
60
#ifdef UNIV_DEBUG
56
61
#ifdef __WIN__
57
62
#ifdef _ITERATOR_DEBUG_LEVEL
63
+ #undef _ITERATOR_DEBUG_LEVEL
58
64
#define _ITERATOR_DEBUG_LEVEL 0
59
65
#endif /* _ITERATOR_DEBUG_LEVEL */
60
66
#endif /* __WIN__*/
Original file line number Diff line number Diff line change @@ -48,14 +48,20 @@ Created 9/5/1995 Heikki Tuuri
48
48
#include " ha_prototypes.h"
49
49
#include " my_cpu.h"
50
50
51
- /* There is a bug in Visual Studio 2010
51
+ /* There is a bug in Visual Studio 2010.
52
52
Visual Studio has a feature "Checked Iterators". In a debug build, every
53
- iterator operation is checked at runtime for errors, e g, out of range.
53
+ iterator operation is checked at runtime for errors, e.g., out of range.
54
+ Because of bug there is runtime error on following code
55
+ for (std::vector<sync_level_t>::iterator it = array->elems.begin(); it !=
56
+ array->elems.end(); ++it) and runtime check fails on comparison
57
+ it != array->elems.end() that is correct and standard way to do end
58
+ of range comparison.
54
59
Disable this "Checked Iterators" for Windows and Debug if defined.
55
60
*/
56
61
#ifdef UNIV_DEBUG
57
62
#ifdef __WIN__
58
63
#ifdef _ITERATOR_DEBUG_LEVEL
64
+ #undef _ITERATOR_DEBUG_LEVEL
59
65
#define _ITERATOR_DEBUG_LEVEL 0
60
66
#endif /* _ITERATOR_DEBUG_LEVEL */
61
67
#endif /* __WIN__*/
You can’t perform that action at this time.
0 commit comments