Commit aaf6c72c authored by jcole@jcole.burghcom.com's avatar jcole@jcole.burghcom.com
Browse files

Aesthetic changes only.

parent a0031e48
Loading
Loading
Loading
Loading
+62 −62
Original line number Diff line number Diff line
@@ -174,12 +174,12 @@ static COMMANDS commands[] = {
  { "rehash", '#', com_rehash, 0, "Rebuild completion hash" },
  { "source", '.', com_source, 1,
    "Execute a SQL script file. Takes a file name as an argument"},

  { "status", 's', com_status, 0, "Get status information from the server"},
  { "use",    'u', com_use,    1,
    "Use another database. Takes database name as argument" },

  { "create table",0,0,0,""},	/* Get bash expansion for some commmands */
  /* Get bash-like expansion for some commmands */
  { "create table",     0, 0, 0, ""},
  { "create database",  0, 0, 0, ""},
  { "drop",             0, 0, 0, ""},
  { "select",           0, 0, 0, ""},
@@ -197,7 +197,7 @@ static COMMANDS commands[] = {
  { "set option",       0, 0, 0, ""},
  { "lock tables",      0, 0, 0, ""},
  { "unlock tables",    0, 0, 0, ""},
  { (char *)NULL, 0,0,0,""},
  { (char *)NULL,       0, 0, 0, ""}
};

static const char *load_default_groups[]= { "mysql","client",0 };
@@ -409,36 +409,36 @@ static void usage(int version)
  puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
  printf("Usage: %s [OPTIONS] [database]\n", my_progname);
  printf("\n\
  -?, --help		Display this help and exit\n\
  -?, --help		Display this help and exit.\n\
  -A, --no-auto-rehash  No automatic rehashing. One has to use 'rehash' to\n\
			get table and field completion. This gives a quicker\n\
			start of mysql and disables rehashing on reconnect.\n\
  -B, --batch		Print results with a tab as separator, each row on\n\
			a new line. Doesn't use history file\n\
			a new line. Doesn't use history file.\n\
  --character-sets-dir=...\n\
                        Directory where character sets are\n\
  -C, --compress	Use compression in server/client protocol\n");
                        Directory where character sets are located.\n\
  -C, --compress	Use compression in server/client protocol.\n");
#ifndef DBUG_OFF
  printf("\
  -#, --debug[=...]     Debug log. Default is '%s'\n",default_dbug_option);
  -#, --debug[=...]     Debug log. Default is '%s'.\n",default_dbug_option);
#endif
  printf("\
  -D, --database=..	Database to use\n\
  -D, --database=..	Database to use.\n\
  --default-character-set=...\n\
                        Set the default character set\n\
                        Set the default character set.\n\
  -e, --execute=...     Execute command and quit. (Output like with --batch)\n\
  -E, --vertical        Print the output of a query (rows) vertically\n\
  -E, --vertical        Print the output of a query (rows) vertically.\n\
  -f, --force           Continue even if we get an sql error.\n\
  -g, --no-named-commands\n\
			 Named commands are disabled. Use \\* form only\n\
  -i, --ignore-space	Ignore space after function names\n\
  -h, --host=...	Connect to host\n\
  -H, --html		Produce HTML output\n\
  -L, --skip-line-numbers  Don't write line number for errors\n\
  -n, --unbuffered	Flush buffer after each query\n\
  -N, --skip-column-names  Don't write column names in results\n\
			Named commands are disabled. Use \\* form only.\n\
  -i, --ignore-space	Ignore space after function names.\n\
  -h, --host=...	Connect to host.\n\
  -H, --html		Produce HTML output.\n\
  -L, --skip-line-numbers  Don't write line number for errors.\n\
  -n, --unbuffered	Flush buffer after each query.\n\
  -N, --skip-column-names  Don't write column names in results.\n\
  -O, --set-variable var=option\n\
			Give a variable an value. --help lists variables\n\
			Give a variable an value. --help lists variables.\n\
  -o, --one-database	Only update the default database. This is useful\n\
			for skipping updates to other database in the update\n\
			log.\n\
@@ -449,27 +449,27 @@ static void usage(int version)
  puts("  -W, --pipe		Use named pipes to connect to server");
#endif
  printf("\n\
  -P  --port=...	Port number to use for connection\n\
  -P  --port=...	Port number to use for connection.\n\
  -q, --quick		Don't cache result, print it row by row. This may\n\
			slow down the server if the output is suspended.\n\
			Doesn't use history file\n\
			Doesn't use history file.\n\
  -r, --raw		Write fields without conversion. Used with --batch\n\
  -s, --silent		Be more silent.\n\
  -S  --socket=...	Socket file to use for connection\n");
  -S  --socket=...	Socket file to use for connection.\n");
#include "sslopt-usage.h"
  printf("\
  -t  --table		Output in table format\n\
  -T, --debug-info	Print some debug info at exit\n");
  -t  --table		Output in table format.\n\
  -T, --debug-info	Print some debug info at exit.\n");
#ifndef DONT_ALLOW_USER_CHANGE
  printf("\
  -u, --user=#		User for login if not current user\n");
  -u, --user=#		User for login if not current user.\n");
#endif
  printf("\
  -U, --safe-updates[=#], --i-am-a-dummy[=#]\n\
		       Only allow UPDATE and DELETE that uses keys\n\
  -v, --verbose		Write more (-v -v -v gives the table output format)\n\
  -V, --version		Output version information and exit\n\
  -w, --wait		Wait and retry if connection is down\n");
		        Only allow UPDATE and DELETE that uses keys.\n\
  -v, --verbose		Write more. (-v -v -v gives the table output format)\n\
  -V, --version		Output version information and exit.\n\
  -w, --wait		Wait and retry if connection is down.\n");
  print_defaults("my",load_default_groups);

  printf("\nPossible variables for option --set-variable (-O) are:\n");
@@ -1618,7 +1618,7 @@ com_connect(String *buffer, char *line)
    strnmov(buff,line,sizeof(buff)-1);		// Don't destroy history
    if (buff[0] == '\\')			// Short command
      buff[1]=' ';
    tmp=(char *) strtok(buff," \t");		// Skipp connect command
    tmp=(char *) strtok(buff," \t");		// Skip connect command
    if (tmp && (tmp=(char *) strtok(NullS," \t;")))
    {
      my_free(current_db,MYF(MY_ALLOW_ZERO_PTR));
@@ -1643,7 +1643,7 @@ com_connect(String *buffer, char *line)
    sprintf(buff,"Connection id:    %ld",mysql_thread_id(&mysql));
    put_info(buff,INFO_INFO);
    sprintf(buff,"Current database: %s\n",
	    current_db ? current_db : "*** NO ONE ***");
	    current_db ? current_db : "*** NONE ***");
    put_info(buff,INFO_INFO);
  }
  return error;
+36 −31
Original line number Diff line number Diff line
/* Copyright (C) 1999 Monty Program KB
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
   
   This software is distributed with NO WARRANTY OF ANY KIND.  No author or
   distributor accepts any responsibility for the consequences of using it, or
   for whether it serves any particular purpose or works at all, unless he or
   she says so in writing.  Refer to the Free Public License (the "License")
   for full details.
   Every copy of this file must include a copy of the License, normally in a
   plain ASCII text file named PUBLIC.	The License grants you the right to
   copy, modify and redistribute this file, but only under certain conditions
   described in the License.  Among other things, the License requires that
   the copyright notice and this notice be preserved on all copies. */
   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
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
   
/* Pack isam file*/
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

/* Pack MyISAM file */

#ifndef USE_MY_FUNC
#define USE_MY_FUNC			/* We nead at least my_malloc */
#define USE_MY_FUNC			/* We need at least my_malloc */
#endif

#include "myisamdef.h"
@@ -25,7 +28,7 @@
#include <io.h>
#endif
#ifndef __GNU_LIBRARY__
#define __GNU_LIBRARY__			/* Skipp warnings in getopt.h */
#define __GNU_LIBRARY__			/* Skip warnings in getopt.h */
#endif
#include <getopt.h>

@@ -252,29 +255,31 @@ static void print_version(void)
static void usage(void)
{
  print_version();
  puts("Copyright (C) 1999-2000 Monty Program KB.");
  puts("This is not free software. You must have a licence to use this program");
  puts("This software comes with ABSOLUTELY NO WARRANTY\n");
  puts("Pack a MyISAM-table to take much smaller space");
  puts("Keys are not updated, one must run myisamchk -rq on datafile afterwards");
  puts("You should give the .MSI file as the filename argument");
  puts("Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB");
  puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,");
  puts("and you are welcome to modify and redistribute it under the GPL license\n");

  puts("Pack a MyISAM-table to take much less space.");
  puts("Keys are not updated, you must run myisamchk -rq on the datafile");
  puts("afterwards to update the keys.");
  puts("You should give the .MSI file as the filename argument.");

  printf("\nUsage: %s [OPTIONS] filename...\n", my_progname);
  puts("\n\
  -b, --backup		Make a backup of the table as table_name.OLD\n\
  -f, --force		Force packing of table even if it's gets bigger or\n\
  -f, --force		Force packing of table even if it gets bigger or if\n\
			tempfile exists.\n\
  -j, --join='new_table_name'\n\
			Join all given tables into 'new_table_name'.\n\
			All tables MUST have the identical layout.\n\
			All tables MUST have identical layouts.\n\
  -s, --silent		Be more silent.\n\
  -t, --test		Don't pack table, only test packing it\n\
  -v, --verbose		Write info about progress and packing result\n\
  -w, --wait		Wait and retry if table is in use\n\
  -T, --tmpdir=#	Use temporary directory to store temporary table\n\
  -#, --debug=...       output debug log. Often this is 'd:t:o,filename`\n\
  -?, --help		display this help and exit\n\
  -V, --version		output version information and exit");
  -t, --test		Don't pack table, only test packing it.\n\
  -v, --verbose		Write info about progress and packing result.\n\
  -w, --wait		Wait and retry if table is in use.\n\
  -T, --tmpdir=...	Use temporary directory to store temporary table.\n\
  -#, --debug=...       Output debug log. Often this is 'd:t:o,filename`\n\
  -?, --help		Display this help and exit.\n\
  -V, --version		Output version information and exit.");
  print_defaults("my",load_default_groups);
};