diff options
author | monty@mysql.com/nosik.monty.fi <> | 2007-08-01 22:59:05 +0300 |
---|---|---|
committer | monty@mysql.com/nosik.monty.fi <> | 2007-08-01 22:59:05 +0300 |
commit | 96f90711a7fb6f6c33b56b0c6519e1f1a7226277 (patch) | |
tree | ea014474c5b5d34f211415d0a43cbc13631ccdfc /client/mysqlshow.c | |
parent | b16289a5e05397211fd47e05ce08fe12f93ec38a (diff) | |
download | mariadb-git-96f90711a7fb6f6c33b56b0c6519e1f1a7226277.tar.gz |
Fixes Bug#30127: --debug-info no longer prints memory usage in mysql
Fixed compiler warnings, errors and link errors
Fixed new bug on Solaris with gethrtime()
Added --debug-check option to all mysql clients to print errors and memory leaks
Added --debug-info to all clients. This now works as --debug-check but also prints memory and cpu usage
Diffstat (limited to 'client/mysqlshow.c')
-rw-r--r-- | client/mysqlshow.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 649658d6223..fb89589f3e1 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -15,7 +15,7 @@ /* Show databases, tables or columns */ -#define SHOW_VERSION "9.6" +#define SHOW_VERSION "9.10" #include "client_priv.h" #include <my_sys.h> @@ -28,7 +28,9 @@ static char * host=0, *opt_password=0, *user=0; static my_bool opt_show_keys= 0, opt_compress= 0, opt_count=0, opt_status= 0; -static my_bool tty_password= 0, opt_table_type= 0, info_flag= 0; +static my_bool tty_password= 0, opt_table_type= 0; +static my_bool debug_info_flag= 0, debug_check_flag= 0; +static uint my_end_arg= 0; static uint opt_verbose=0; static char *default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME; @@ -150,7 +152,7 @@ int main(int argc, char **argv) #ifdef HAVE_SMEM my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); #endif - my_end(info_flag ? MY_CHECK_ERROR : 0); + my_end(my_end_arg); exit(error ? 1 : 0); return 0; /* No compiler warnings */ } @@ -176,8 +178,12 @@ static struct my_option my_long_options[] = 0, 0, 0}, {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag, - (uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .", + (uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0, + GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", + (uchar**) &debug_info_flag, (uchar**) &debug_info_flag, + 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"host", 'h', "Connect to host.", (uchar**) &host, (uchar**) &host, 0, GET_STR, @@ -326,6 +332,10 @@ get_options(int *argc,char ***argv) */ opt_verbose= 2; } + if (debug_info_flag) + my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO; + if (debug_check_flag) + my_end_arg= MY_CHECK_ERROR; return; } |