diff options
author | unknown <monty@hundin.mysql.fi> | 2001-10-08 05:36:35 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-10-08 05:36:35 +0300 |
commit | 515c747dcfcca8d04a509496c5864f302d6d76be (patch) | |
tree | 87a4027a65ad98a422987c566b6d394464e95623 /tools | |
parent | 41972bea9234345ed36ea92d40c0b0cf3ec315b0 (diff) | |
parent | cef1d752497f81229788e56abaf7fa62c1ab31a9 (diff) | |
download | mariadb-git-515c747dcfcca8d04a509496c5864f302d6d76be.tar.gz |
merge
BitKeeper/etc/ignore:
auto-union
acinclude.m4:
Auto merged
Docs/manual.texi:
Auto merged
include/my_sys.h:
Auto merged
include/mysql.h:
Auto merged
libmysqld/libmysqld.c:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/t/count_distinct2.test:
Auto merged
mysql-test/t/flush.test:
Auto merged
mysql-test/t/rpl000017.test:
Auto merged
libmysql/libmysql.c:
Auto merged
mysys/Makefile.am:
Auto merged
sql/Makefile.am:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
libmysqld/Makefile.am:
Added back md5.c
Diffstat (limited to 'tools')
-rw-r--r-- | tools/mysqlmanager.c | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/tools/mysqlmanager.c b/tools/mysqlmanager.c index 869982656d1..f595d8564ce 100644 --- a/tools/mysqlmanager.c +++ b/tools/mysqlmanager.c @@ -228,26 +228,25 @@ struct manager_exec static int set_exec_param(struct manager_thd* thd, char* args_start, char* args_end, PARAM_TYPE param_type); -#define HANDLE_DECL(com) static int handle_ ## com (struct manager_thd* thd,\ - char* args_start,char* args_end) - -#define HANDLE_NOARG_DECL(com) static int handle_ ## com \ +#define HANDLE_DECL(com) static int com (struct manager_thd* thd, char* args_start,char* args_end) +#define HANDLE_NOARG_DECL(com) static int com \ (struct manager_thd* thd, char* __attribute__((unused)) args_start,\ char* __attribute__((unused)) args_end) -HANDLE_NOARG_DECL(ping); -HANDLE_NOARG_DECL(quit); -HANDLE_NOARG_DECL(help); -HANDLE_NOARG_DECL(shutdown); -HANDLE_DECL(def_exec); -HANDLE_DECL(start_exec); -HANDLE_DECL(stop_exec); -HANDLE_DECL(set_exec_con); -HANDLE_DECL(set_exec_stdout); -HANDLE_DECL(set_exec_stderr); -HANDLE_DECL(query); -HANDLE_NOARG_DECL(show_exec); +HANDLE_NOARG_DECL(handle_ping); +HANDLE_NOARG_DECL(handle_quit); +HANDLE_NOARG_DECL(handle_help); +HANDLE_NOARG_DECL(handle_shutdown); +HANDLE_DECL(handle_def_exec); +HANDLE_DECL(handle_start_exec); +HANDLE_DECL(handle_stop_exec); +HANDLE_DECL(handle_set_exec_con); +HANDLE_DECL(handle_set_exec_stdout); +HANDLE_DECL(handle_set_exec_stderr); +HANDLE_NOARG_DECL(handle_show_exec); +HANDLE_DECL(handle_query); + struct manager_cmd commands[] = { @@ -393,20 +392,20 @@ static struct manager_cmd* lookup_cmd(char* s,int len) return 0; } -HANDLE_NOARG_DECL(ping) +HANDLE_NOARG_DECL(handle_ping) { client_msg(thd->vio,MANAGER_OK,"Server management daemon is alive"); return 0; } -HANDLE_NOARG_DECL(quit) +HANDLE_NOARG_DECL(handle_quit) { client_msg(thd->vio,MANAGER_OK,"Goodbye"); thd->finished=1; return 0; } -HANDLE_NOARG_DECL(help) +HANDLE_NOARG_DECL(handle_help) { struct manager_cmd* cmd = commands; Vio* vio = thd->vio; @@ -419,7 +418,7 @@ HANDLE_NOARG_DECL(help) return 0; } -HANDLE_NOARG_DECL(shutdown) +HANDLE_NOARG_DECL(handle_shutdown) { client_msg(thd->vio,MANAGER_OK,"Shutdown started, goodbye"); thd->finished=1; @@ -432,7 +431,7 @@ HANDLE_NOARG_DECL(shutdown) return 0; } -HANDLE_DECL(set_exec_con) +HANDLE_DECL(handle_set_exec_con) { int num_args; const char* error=0; @@ -479,12 +478,12 @@ err: return 1; } -HANDLE_DECL(set_exec_stdout) +HANDLE_DECL(handle_set_exec_stdout) { return set_exec_param(thd,args_start,args_end,PARAM_STDOUT); } -HANDLE_DECL(set_exec_stderr) +HANDLE_DECL(handle_set_exec_stderr) { return set_exec_param(thd,args_start,args_end,PARAM_STDERR); } @@ -541,7 +540,7 @@ err: } -HANDLE_DECL(start_exec) +HANDLE_DECL(handle_start_exec) { int num_args; struct manager_exec* e; @@ -590,7 +589,7 @@ err: return 1; } -HANDLE_DECL(stop_exec) +HANDLE_DECL(handle_stop_exec) { int num_args; struct timespec abstime; @@ -729,7 +728,7 @@ err: return 1; } -HANDLE_DECL(def_exec) +HANDLE_DECL(handle_def_exec) { struct manager_exec* e=0,*old_e; const char* error=0; @@ -767,7 +766,7 @@ err: return 1; } -HANDLE_NOARG_DECL(show_exec) +HANDLE_NOARG_DECL(handle_show_exec) { uint i; client_msg_pre(thd->vio,MANAGER_INFO,"Exec_def\tPid\tExit_status\tCon_info\ @@ -1027,19 +1026,19 @@ static void log_msg(const char* fmt, int msg_type, va_list args) pthread_mutex_unlock(&lock_log); } -#define LOG_MSG_FUNC(type,TYPE) inline static void log_ ## type \ +#define LOG_MSG_FUNC(type,TYPE) inline static void type \ (const char* fmt,...) { \ va_list args; \ va_start(args,fmt); \ - log_msg(fmt,LOG_ ## TYPE,args);\ + log_msg(fmt,TYPE,args);\ } -LOG_MSG_FUNC(err,ERR) -LOG_MSG_FUNC(warn,WARN) -LOG_MSG_FUNC(info,INFO) +LOG_MSG_FUNC(log_err,LOG_ERR) +LOG_MSG_FUNC(log_warn,LOG_WARN) +LOG_MSG_FUNC(log_info,LOG_INFO) #ifndef DBUG_OFF -LOG_MSG_FUNC(debug,DEBUG) +LOG_MSG_FUNC(log_debug,LOG_DEBUG) #else inline void log_debug(char* __attribute__((unused)) fmt,...) {} #endif |