mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
4a7af05c7f
BitKeeper/deleted/.del-compile-ia64-O0-sgicc~a4e0732013d6b602: Delete: BUILD/compile-ia64-O0-sgicc BitKeeper/deleted/.del-compile-ia64-O0~3a41dfebefc817d1: Delete: BUILD/compile-ia64-O0 BitKeeper/deleted/.del-compile-ia64-O2-sgicc~6ff796ecac337849: Delete: BUILD/compile-ia64-O2-sgicc BitKeeper/deleted/.del-compile-ia64-O2~87d13594c3599830: Delete: BUILD/compile-ia64-O2 BitKeeper/deleted/.del-compile-ia64-O6~c34e6b943b12c468: Delete: BUILD/compile-ia64-O6 Docs/manual.texi: Cleanup mysql-test/r/rpl000014.result: Change port number for comparison mysql-test/r/rpl000015.result: Change port number for comparison mysql-test/r/rpl000016.result: Change port number for comparison mysql-test/t/rpl000014.test: Change port number for comparison mysql-test/t/rpl000015.test: Change port number for comparison mysql-test/t/rpl000016.test: Change port number for comparison sql-bench/Results/ATIS-mysql-NT_4.0: New test results sql-bench/Results/RUN-mysql-NT_4.0: New test results sql-bench/Results/alter-table-mysql-NT_4.0: New test results sql-bench/Results/big-tables-mysql-NT_4.0: New test results sql-bench/Results/connect-mysql-NT_4.0: New test results sql-bench/Results/create-mysql-NT_4.0: New test results sql-bench/Results/insert-mysql-NT_4.0: New test results sql-bench/Results/select-mysql-NT_4.0: New test results sql-bench/Results/wisconsin-mysql-NT_4.0: New test results sql/slave.cc: Removed not used variable
84 lines
1.9 KiB
C
84 lines
1.9 KiB
C
/*********************************************************************
|
|
Debug utilities for Innobase
|
|
|
|
(c) 1994, 1995 Innobase Oy
|
|
|
|
Created 1/30/1994 Heikki Tuuri
|
|
**********************************************************************/
|
|
|
|
#ifndef ut0dbg_h
|
|
#define ut0dbg_h
|
|
|
|
#include "univ.i"
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include "os0thread.h"
|
|
|
|
extern ulint ut_dbg_zero; /* This is used to eliminate
|
|
compiler warnings */
|
|
extern ibool ut_dbg_stop_threads;
|
|
|
|
extern ulint* ut_dbg_null_ptr;
|
|
|
|
|
|
#define ut_a(EXPR)\
|
|
{\
|
|
ulint dbg_i;\
|
|
\
|
|
if (!((ulint)(EXPR) + ut_dbg_zero)) {\
|
|
fprintf(stderr,\
|
|
"Innobase: Assertion failure in thread %lu in file %s line %lu\n",\
|
|
os_thread_get_curr_id(), IB__FILE__, (ulint)__LINE__);\
|
|
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) {\
|
|
ut_dbg_null_ptr = NULL;\
|
|
}\
|
|
}\
|
|
if (ut_dbg_stop_threads) {\
|
|
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);\
|
|
}\
|
|
}
|
|
|
|
#define ut_error {\
|
|
ulint dbg_i;\
|
|
fprintf(stderr,\
|
|
"Innobase: Assertion failure in thread %lu in file %s line %lu\n",\
|
|
os_thread_get_curr_id(), IB__FILE__, (ulint)__LINE__);\
|
|
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);\
|
|
}
|
|
|
|
|
|
|
|
#ifdef UNIV_DEBUG
|
|
#define ut_ad(EXPR) ut_a(EXPR)
|
|
#define ut_d(EXPR) {EXPR;}
|
|
#else
|
|
#define ut_ad(EXPR)
|
|
#define ut_d(EXPR)
|
|
#endif
|
|
|
|
|
|
#define UT_NOT_USED(A) A = A
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|