diff options
author | unknown <heikki@donna.mysql.fi> | 2001-04-05 21:52:59 +0300 |
---|---|---|
committer | unknown <heikki@donna.mysql.fi> | 2001-04-05 21:52:59 +0300 |
commit | 27d9f781f25101f62dc175d13f16b2976f2bd551 (patch) | |
tree | 0034807c6c68a0e5b6ca201426962249f4d6a03c | |
parent | 9890ef99be1e2730e87f06b7aecbb99b0e0f230a (diff) | |
download | mariadb-git-27d9f781f25101f62dc175d13f16b2976f2bd551.tar.gz |
ut0dbg.h Print a better error message when an assertion fails
innobase/include/ut0dbg.h:
Print a better error message when an assertion fails
-rw-r--r-- | innobase/include/ut0dbg.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/innobase/include/ut0dbg.h b/innobase/include/ut0dbg.h index 3a7d97bb75b..a36b022e036 100644 --- a/innobase/include/ut0dbg.h +++ b/innobase/include/ut0dbg.h @@ -26,11 +26,13 @@ extern ulint* ut_dbg_null_ptr; ulint dbg_i;\ \ if (!((ulint)(EXPR) + ut_dbg_zero)) {\ - printf(\ - "Assertion failure in thread %lu in file %s line %lu\n",\ + fprintf(stderr,\ + "Innobase: Assertion failure in thread %lu in file %s line %lu\n",\ os_thread_get_curr_id(), IB__FILE__, (ulint)__LINE__);\ - printf(\ - "we generate a memory trap on purpose to start the debugger\n");\ + fprintf(stderr,\ + "Innobase: we intentionally generate a memory trap.\n");\ + fprintf(stderr,\ + "Innobase: Send a bug report to mysql@lists.mysql.com\n");\ ut_dbg_stop_threads = TRUE;\ dbg_i = *(ut_dbg_null_ptr);\ if (dbg_i) {\ @@ -38,7 +40,8 @@ extern ulint* ut_dbg_null_ptr; }\ }\ if (ut_dbg_stop_threads) {\ - printf("Thread %lu stopped in file %s line %lu\n",\ + fprintf(stderr,\ + "Innobase: Thread %lu stopped in file %s line %lu\n",\ os_thread_get_curr_id(), IB__FILE__, (ulint)__LINE__);\ os_thread_sleep(1000000000);\ }\ @@ -46,10 +49,13 @@ extern ulint* ut_dbg_null_ptr; #define ut_error {\ ulint dbg_i;\ - printf(\ - "Assertion failure in thread %lu in file %s line %lu\n",\ + fprintf(stderr,\ + "Innobase: Assertion failure in thread %lu in file %s line %lu\n",\ os_thread_get_curr_id(), IB__FILE__, (ulint)__LINE__);\ - printf("Generates memory trap on purpose for stack debugging\n");\ + fprintf(stderr,\ + "Innobase: we intentionally generate a memory trap.\n");\ + fprintf(stderr,\ + "Innobase: Send a bug report to mysql@lists.mysql.com\n");\ ut_dbg_stop_threads = TRUE;\ dbg_i = *(ut_dbg_null_ptr);\ printf("%lu", dbg_i);\ |