summaryrefslogtreecommitdiff
path: root/include/my_dbug.h
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2018-01-14 19:50:45 +0300
committerSergey Vojtovich <svoj@mariadb.org>2018-01-14 20:50:45 +0400
commit72136ae75c69cee5230e7be286cf12663d3d15ef (patch)
treee9ac0ea03cefb7aace6a455e856157b0980ad4c4 /include/my_dbug.h
parentfc65577873967ecbba93b75260cc54275f5900d2 (diff)
downloadmariadb-git-72136ae75c69cee5230e7be286cf12663d3d15ef.tar.gz
Compilation speed (#546)
Speed up compilation Standard C++ headers contribute a lot to compilation time. Avoid algorithm and sstream in frequently used headers.
Diffstat (limited to 'include/my_dbug.h')
-rw-r--r--include/my_dbug.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/my_dbug.h b/include/my_dbug.h
index ba9e8a025d7..003290afb96 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -195,10 +195,14 @@ void debug_sync_point(const char* lock_name, uint lock_timeout);
#ifdef __cplusplus
}
+/*
+ DBUG_LOG() was initially intended for InnoDB. To be able to use it elsewhere
+ one should #include <sstream>. We intentially avoid including it here to save
+ compilation time.
+*/
# ifdef DBUG_OFF
# define DBUG_LOG(keyword, v) do {} while (0)
# else
-# include <sstream>
# define DBUG_LOG(keyword, v) do { \
if (_db_pargs_(__LINE__, keyword)) { \
std::ostringstream _db_s; _db_s << v; \