diff options
author | unknown <serg@janus.mylan> | 2008-02-01 16:21:44 +0100 |
---|---|---|
committer | unknown <serg@janus.mylan> | 2008-02-01 16:21:44 +0100 |
commit | d79e70597acbf4fab0e848d8df42888404cb2c29 (patch) | |
tree | c72f9566f5025f5c069393faf8da971fcb331364 /include/my_dbug.h | |
parent | 74efae60fcd186e15da1b123f7765c66f8598f4a (diff) | |
download | mariadb-git-d79e70597acbf4fab0e848d8df42888404cb2c29.tar.gz |
negative lists in dbug (-#-d,info => everything but "info").
unit tests for dbug
dbug/Makefile.am:
unit tests for dbug
dbug/dbug.c:
negative lists (-#-d,info => everything but "info")
include/my_dbug.h:
negative lists (-#-d,info => everything but "info")
unittest/Makefile.am:
unit tests for dbug
dbug/tests-t.pl:
unit tests for dbug
dbug/tests.c:
unit tests for dbug
Diffstat (limited to 'include/my_dbug.h')
-rw-r--r-- | include/my_dbug.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/my_dbug.h b/include/my_dbug.h index a284e648f7f..0e3af702389 100644 --- a/include/my_dbug.h +++ b/include/my_dbug.h @@ -22,8 +22,7 @@ extern "C" { #if !defined(DBUG_OFF) && !defined(_lint) struct _db_code_state_; extern my_bool _dbug_on_; -extern my_bool _db_keyword_(struct _db_code_state_ *cs, const char *keyword); -extern my_bool _db_strict_keyword_(const char *keyword); +extern my_bool _db_keyword_(struct _db_code_state_ *, const char *, int); extern int _db_explain_(struct _db_code_state_ *cs, char *buf, size_t len); extern int _db_explain_init_(char *buf, size_t len); extern void _db_setjmp_(void); @@ -58,13 +57,13 @@ extern void _db_force_flush(); #define DBUG_RETURN(a1) do {DBUG_LEAVE; return(a1);} while(0) #define DBUG_VOID_RETURN do {DBUG_LEAVE; return;} while(0) #define DBUG_EXECUTE(keyword,a1) \ - do {if (_db_keyword_(0, (keyword))) { a1 }} while(0) + do {if (_db_keyword_(0, (keyword), 0)) { a1 }} while(0) #define DBUG_EXECUTE_IF(keyword,a1) \ - do {if (_db_strict_keyword_ (keyword)) { a1 } } while(0) + do {if (_db_keyword_(0, (keyword), 1)) { a1 }} while(0) #define DBUG_EVALUATE(keyword,a1,a2) \ - (_db_keyword_(0,(keyword)) ? (a1) : (a2)) + (_db_keyword_(0,(keyword), 0) ? (a1) : (a2)) #define DBUG_EVALUATE_IF(keyword,a1,a2) \ - (_db_strict_keyword_((keyword)) ? (a1) : (a2)) + (_db_keyword_(0,(keyword), 1) ? (a1) : (a2)) #define DBUG_PRINT(keyword,arglist) \ do {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;} while(0) #define DBUG_PUSH(a1) _db_push_ (a1) |