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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3dec2b5c
Commit
3dec2b5c
authored
Apr 05, 2001
by
heikki@donna.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ut0dbg.h Print a better error message when an assertion fails
parent
43cc214f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
innobase/include/ut0dbg.h
innobase/include/ut0dbg.h
+14
-8
No files found.
innobase/include/ut0dbg.h
View file @
3dec2b5c
...
@@ -26,11 +26,13 @@ extern ulint* ut_dbg_null_ptr;
...
@@ -26,11 +26,13 @@ extern ulint* ut_dbg_null_ptr;
ulint dbg_i;\
ulint dbg_i;\
\
\
if (!((ulint)(EXPR) + ut_dbg_zero)) {\
if (!((ulint)(EXPR) + ut_dbg_zero)) {\
printf(
\
fprintf(stderr,
\
"
Assertion failure in thread %lu in file %s line %lu\n",\
"Innobase:
Assertion failure in thread %lu in file %s line %lu\n",\
os_thread_get_curr_id(), IB__FILE__, (ulint)__LINE__);\
os_thread_get_curr_id(), IB__FILE__, (ulint)__LINE__);\
printf(\
fprintf(stderr,\
"we generate a memory trap on purpose to start the debugger\n");\
"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;\
ut_dbg_stop_threads = TRUE;\
dbg_i = *(ut_dbg_null_ptr);\
dbg_i = *(ut_dbg_null_ptr);\
if (dbg_i) {\
if (dbg_i) {\
...
@@ -38,7 +40,8 @@ extern ulint* ut_dbg_null_ptr;
...
@@ -38,7 +40,8 @@ extern ulint* ut_dbg_null_ptr;
}\
}\
}\
}\
if (ut_dbg_stop_threads) {\
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_get_curr_id(), IB__FILE__, (ulint)__LINE__);\
os_thread_sleep(1000000000);\
os_thread_sleep(1000000000);\
}\
}\
...
@@ -46,10 +49,13 @@ extern ulint* ut_dbg_null_ptr;
...
@@ -46,10 +49,13 @@ extern ulint* ut_dbg_null_ptr;
#define ut_error {\
#define ut_error {\
ulint dbg_i;\
ulint dbg_i;\
printf(
\
fprintf(stderr,
\
"
Assertion failure in thread %lu in file %s line %lu\n",\
"Innobase:
Assertion failure in thread %lu in file %s line %lu\n",\
os_thread_get_curr_id(), IB__FILE__, (ulint)__LINE__);\
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;\
ut_dbg_stop_threads = TRUE;\
dbg_i = *(ut_dbg_null_ptr);\
dbg_i = *(ut_dbg_null_ptr);\
printf("%lu", dbg_i);\
printf("%lu", dbg_i);\
...
...
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