summaryrefslogtreecommitdiff
path: root/include/my_dbug.h
diff options
context:
space:
mode:
authorunknown <guilhem@mysqlwin32.>2008-02-07 16:54:13 +0100
committerunknown <guilhem@mysqlwin32.>2008-02-07 16:54:13 +0100
commit0954594b2d42d8e3acd411bc08a59cdd88ecb178 (patch)
tree2abeaa9852b9abbbb11d5ee413b8347263f03690 /include/my_dbug.h
parent8bb95a820ad92cd39e9ade0b70989bee7fe6d040 (diff)
downloadmariadb-git-0954594b2d42d8e3acd411bc08a59cdd88ecb178.tar.gz
Fixes for DBUG_ABORT()
BitKeeper/deleted/.del-.tree-is-private: Delete: .tree-is-private include/my_dbug.h: To disable the popup of abort() we use _CrtReportMode/File() (thanks Wlad) mysys/my_thr_init.c: Visual Studio 2005 does not allow overloading library functions.
Diffstat (limited to 'include/my_dbug.h')
-rw-r--r--include/my_dbug.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/my_dbug.h b/include/my_dbug.h
index d6d76f0b418..587d2936625 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -87,7 +87,20 @@ extern void _db_flush_();
#define DEBUGGER_OFF do { _dbug_on_= 0; } while(0)
#define DEBUGGER_ON do { _dbug_on_= 1; } while(0)
#define IF_DBUG(A) A
+#ifndef __WIN__
#define DBUG_ABORT() (_db_flush_(), abort())
+#else
+/*
+ Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we can
+ call abort() instead of _exit(3) (now it would cause a "test signal" popup).
+*/
+#include <crtdbg.h>
+#define DBUG_ABORT() (_db_flush_(),\
+ (void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE),\
+ (void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR),\
+ _exit(3))
+#endif
+
#else /* No debugger */
#define DBUG_ENTER(a1)