Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
721692f3
Commit
721692f3
authored
21 years ago
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ut0dbg.h, ut0dbg.c:
Marko's patch to ut_a() fputs
parent
aa2869a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
40 deletions
+25
-40
innobase/include/ut0dbg.h
innobase/include/ut0dbg.h
+18
-34
innobase/ut/ut0dbg.c
innobase/ut/ut0dbg.c
+7
-6
No files found.
innobase/include/ut0dbg.h
View file @
721692f3
...
...
@@ -20,50 +20,34 @@ extern ibool ut_dbg_stop_threads;
extern
ulint
*
ut_dbg_null_ptr
;
extern
const
char
*
ut_dbg_msg_assert_fail
;
extern
const
char
*
ut_dbg_msg_trap
;
extern
const
char
*
ut_dbg_msg_stop
;
#define ut_a(EXPR)\
{\
ulint dbg_i;\
\
if (!((ulint)(EXPR) + ut_dbg_zero)) {\
ut_print_timestamp(stderr);\
fprintf(stderr,\
" InnoDB: Assertion failure in thread %lu in file %s line %lu\n",\
fprintf(stderr, ut_dbg_msg_assert_fail,\
os_thread_pf(os_thread_get_curr_id()), IB__FILE__,\
(ulint)__LINE__);\
fputs(\
"InnoDB: Failing assertion: " #EXPR, stderr);\
fprintf(stderr,\
"\nInnoDB: We intentionally generate a memory trap.\n");\
fprintf(stderr,\
"InnoDB: Send a detailed bug report to mysql@lists.mysql.com\n");\
fputs("InnoDB: Failing assertion: " #EXPR "\n", stderr);\
fputs(ut_dbg_msg_trap, stderr);\
ut_dbg_stop_threads = TRUE;\
dbg_i = *(ut_dbg_null_ptr);\
if (dbg_i) {\
ut_dbg_null_ptr = NULL;\
}\
(*ut_dbg_null_ptr)++;\
}\
if (ut_dbg_stop_threads) {\
fprintf(stderr,\
"InnoDB: Thread %lu stopped in file %s line %lu\n",\
fprintf(stderr, ut_dbg_msg_stop,\
os_thread_pf(os_thread_get_curr_id()), IB__FILE__, (ulint)__LINE__);\
os_thread_sleep(1000000000);\
}\
}
#define ut_error {\
ulint dbg_i;\
ut_print_timestamp(stderr);\
fprintf(stderr,\
" InnoDB: Assertion failure in thread %lu in file %s line %lu\n",\
os_thread_pf(os_thread_get_curr_id()), IB__FILE__, (ulint)__LINE__);\
fprintf(stderr,\
"InnoDB: We intentionally generate a memory trap.\n");\
fprintf(stderr,\
"InnoDB: Send a detailed bug report to mysql@lists.mysql.com\n");\
ut_dbg_stop_threads = TRUE;\
dbg_i = *(ut_dbg_null_ptr);\
printf("%lu", dbg_i);\
}
}
#define ut_error\
ut_print_timestamp(stderr);\
fprintf(stderr, ut_dbg_msg_assert_fail,\
os_thread_pf(os_thread_get_curr_id()), IB__FILE__, (ulint)__LINE__);\
fprintf(stderr, ut_dbg_msg_trap);\
ut_dbg_stop_threads = TRUE;\
(*ut_dbg_null_ptr)++;
#ifdef UNIV_DEBUG
#define ut_ad(EXPR) ut_a(EXPR)
...
...
This diff is collapsed.
Click to expand it.
innobase/ut/ut0dbg.c
View file @
721692f3
...
...
@@ -19,9 +19,10 @@ ibool ut_dbg_stop_threads = FALSE;
ulint
*
ut_dbg_null_ptr
=
NULL
;
/* Dummy function to prevent gcc from ignoring this file */
void
ut_dummy
(
void
)
{
printf
(
"Hello world
\n
"
);
}
const
char
*
ut_dbg_msg_assert_fail
=
"InnoDB: Assertion failure in thread %lu in file %s line %lu
\n
"
;
const
char
*
ut_dbg_msg_trap
=
"InnoDB: We intentionally generate a memory trap.
\n
"
"InnoDB: Send a detailed bug report to mysql@lists.mysql.com.
\n
"
;
const
char
*
ut_dbg_msg_stop
=
"InnoDB: Thread %lu stopped in file %s line %lu
\n
"
;
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment