mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-build
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-build client/mysql.cc: Auto merged
This commit is contained in:
commit
f36fb54111
1 changed files with 14 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2000-2003 MySQL AB
|
||||
/* Copyright (C) 2000-2008 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -794,7 +794,7 @@ static void usage(int version)
|
|||
if (version)
|
||||
return;
|
||||
printf("\
|
||||
Copyright (C) 2002 MySQL AB\n\
|
||||
Copyright (C) 2000-2008 MySQL AB\n\
|
||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
|
||||
and you are welcome to modify and redistribute it under the GPL license\n");
|
||||
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
|
||||
|
@ -2145,7 +2145,8 @@ com_charset(String *buffer __attribute__((unused)), char *line)
|
|||
static int
|
||||
com_go(String *buffer,char *line __attribute__((unused)))
|
||||
{
|
||||
char buff[200], time_buff[32], *pos;
|
||||
char buff[200]; /* about 110 chars used so far */
|
||||
char time_buff[52+3+1]; /* time max + space&parens + NUL */
|
||||
MYSQL_RES *result;
|
||||
ulong timer, warnings;
|
||||
uint error= 0;
|
||||
|
@ -2211,6 +2212,8 @@ com_go(String *buffer,char *line __attribute__((unused)))
|
|||
|
||||
do
|
||||
{
|
||||
char *pos;
|
||||
|
||||
if (quick)
|
||||
{
|
||||
if (!(result=mysql_use_result(&mysql)) && mysql_field_count(&mysql))
|
||||
|
@ -2232,7 +2235,9 @@ com_go(String *buffer,char *line __attribute__((unused)))
|
|||
if (verbose >= 3 || !opt_silent)
|
||||
mysql_end_timer(timer,time_buff);
|
||||
else
|
||||
time_buff[0]=0;
|
||||
time_buff[0]= '\0';
|
||||
|
||||
/* Every branch must truncate buff . */
|
||||
if (result)
|
||||
{
|
||||
if (!mysql_num_rows(result) && ! quick && !info_flag)
|
||||
|
@ -3791,6 +3796,11 @@ static ulong start_timer(void)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
Write as many as 52+1 bytes to buff, in the form of a legible duration of time.
|
||||
|
||||
len("4294967296 days, 23 hours, 59 minutes, 60.00 seconds") -> 52
|
||||
*/
|
||||
static void nice_time(double sec,char *buff,bool part_second)
|
||||
{
|
||||
ulong tmp;
|
||||
|
|
Loading…
Reference in a new issue