Navigation Menu

Skip to content

Commit

Permalink
Move MRN_DBUG_ENTER_* to mrn_mysql.h
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 9, 2012
1 parent 98bb04a commit f54650f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
14 changes: 0 additions & 14 deletions ha_mroonga.cpp
Expand Up @@ -45,24 +45,10 @@
#include "ha_mroonga.hpp"
#include <mrn_path_mapper.hpp>

#define MRN_MESSAGE_BUFFER_SIZE 1024

#define MRN_SHORT_TEXT_SIZE (1 << 12) // 4Kbytes
#define MRN_TEXT_SIZE (1 << 16) // 64Kbytes
#define MRN_LONG_TEXT_SIZE (1 << 31) // 2Gbytes

#define MRN_DBUG_ENTER_FUNCTION() DBUG_ENTER(__FUNCTION__)
#if !defined(DBUG_OFF) && !defined(_lint)
# define MRN_DBUG_ENTER_METHOD() \
char method_name[MRN_MESSAGE_BUFFER_SIZE]; \
method_name[0] = '\0'; \
strcat(method_name, "ha_mroonga::"); \
strcat(method_name, __FUNCTION__); \
DBUG_ENTER(method_name)
#else
# define MRN_DBUG_ENTER_METHOD() MRN_DBUG_ENTER_FUNCTION()
#endif

#if MYSQL_VERSION_ID >= 50500
extern mysql_mutex_t LOCK_open;
# define mrn_open_mutex_lock() mysql_mutex_lock(&LOCK_open)
Expand Down
13 changes: 13 additions & 0 deletions mrn_mysql.h
Expand Up @@ -57,6 +57,19 @@
# define MRN_MARIADB_P 1
#endif

#define MRN_MESSAGE_BUFFER_SIZE 1024

#define MRN_DBUG_ENTER_FUNCTION() DBUG_ENTER(__FUNCTION__)

#if !defined(DBUG_OFF) && !defined(_lint)
# define MRN_DBUG_ENTER_METHOD() \
char method_name[MRN_MESSAGE_BUFFER_SIZE]; \
method_name[0] = '\0'; \
strcat(method_name, "ha_mroonga::"); \
strcat(method_name, __FUNCTION__); \
DBUG_ENTER(method_name)
#else
# define MRN_DBUG_ENTER_METHOD() MRN_DBUG_ENTER_FUNCTION()
#endif

#endif /* _mrn_mysql_h */

0 comments on commit f54650f

Please sign in to comment.