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
3ef65f27
Commit
3ef65f27
authored
Aug 20, 2020
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added DBUG_PUSH_EMPTY and DBUG_POP_EMPTY to speed up DBUG
parent
b1ba3a19
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
include/my_dbug.h
include/my_dbug.h
+5
-0
mysys/thr_mutex.c
mysys/thr_mutex.c
+2
-2
sql/filesort.cc
sql/filesort.cc
+2
-2
No files found.
include/my_dbug.h
View file @
3ef65f27
...
...
@@ -106,6 +106,9 @@ extern int (*dbug_sanity)(void);
(_db_keyword_(0,(keyword), 1) ? (a1) : (a2))
#define DBUG_PRINT(keyword,arglist) \
do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0)
#define DBUG_PUSH_EMPTY if (_dbug_on_) { DBUG_PUSH(""); }
#define DBUG_POP_EMPTY if (_dbug_on_) { DBUG_POP(); }
#define DBUG_PUSH(a1) _db_push_ (a1)
#define DBUG_POP() _db_pop_ ()
#define DBUG_SET(a1) _db_set_ (a1)
...
...
@@ -172,6 +175,8 @@ extern void _db_suicide_(void);
#define DBUG_EVALUATE(keyword,a1,a2) (a2)
#define DBUG_EVALUATE_IF(keyword,a1,a2) (a2)
#define DBUG_PRINT(keyword,arglist) do { } while(0)
#define DBUG_PUSH_EMPTY do { } while(0)
#define DBUG_POP_EMPTY do { } while(0)
#define DBUG_PUSH(a1) do { } while(0)
#define DBUG_SET(a1) do { } while(0)
#define DBUG_SET_INITIAL(a1) do { } while(0)
...
...
mysys/thr_mutex.c
View file @
3ef65f27
...
...
@@ -233,7 +233,7 @@ int safe_mutex_lock(safe_mutex_t *mp, myf my_flags, const char *file,
int
error
;
DBUG_PRINT
(
"mutex"
,
(
"%s (0x%lx) locking"
,
mp
->
name
?
mp
->
name
:
"Null"
,
(
ulong
)
mp
));
DBUG_PUSH
(
""
)
;
DBUG_PUSH
_EMPTY
;
pthread_mutex_lock
(
&
mp
->
global
);
if
(
!
mp
->
file
)
...
...
@@ -395,7 +395,7 @@ int safe_mutex_lock(safe_mutex_t *mp, myf my_flags, const char *file,
}
end:
DBUG_POP
()
;
DBUG_POP
_EMPTY
;
if
(
!
error
)
DBUG_PRINT
(
"mutex"
,
(
"%s (0x%lx) locked"
,
mp
->
name
,
(
ulong
)
mp
));
return
error
;
...
...
sql/filesort.cc
View file @
3ef65f27
...
...
@@ -215,7 +215,7 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort,
DBUG_EXECUTE
(
"info"
,
TEST_filesort
(
filesort
->
sortorder
,
s_length
););
#ifdef SKIP_DBUG_IN_FILESORT
DBUG_PUSH
(
""
)
;
/* No DBUG here */
DBUG_PUSH
_EMPTY
;
/* No DBUG here */
#endif
SORT_INFO
*
sort
;
TABLE_LIST
*
tab
=
table
->
pos_in_table_list
;
...
...
@@ -493,7 +493,7 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort,
sort
->
examined_rows
=
param
.
examined_rows
;
sort
->
return_rows
=
num_rows
;
#ifdef SKIP_DBUG_IN_FILESORT
DBUG_POP
();
/* Ok to DBUG */
DBUG_POP
_EMPTY
;
/* Ok to DBUG */
#endif
DBUG_PRINT
(
"exit"
,
...
...
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