summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/my_global.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/my_global.h b/include/my_global.h
index b0a26e67d9b..e474b620d27 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -533,8 +533,12 @@ C_MODE_END
#undef DBUG_OFF
#endif
-#if defined(_lint) && !defined(DBUG_OFF)
-#define DBUG_OFF
+/* We might be forced to turn debug off, if not turned off already */
+#if (defined(FORCE_DBUG_OFF) || defined(_lint)) && !defined(DBUG_OFF)
+# define DBUG_OFF
+# ifdef DBUG_ON
+# undef DBUG_ON
+# endif
#endif
#include <my_dbug.h>