"Enable automatic rehashing. One doesn't need to use 'rehash' to get table and field completion, but startup and reconnecting may take a longer time. Disable with --disable-auto-rehash.",
"No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect. WARNING: options depricated; use --disable-auto-rehash instead.",
0,0,0,GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
{"batch",'B',
"Print results with a tab as separator, each row on new line. Doesn't use history file.",0,0,0,GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
{"character-sets-dir",OPT_CHARSETS_DIR,
"Directory where character sets are.",(gptr*)&charsets_dir,
{"no-named-commands",'g',"Named commands are disabled. Use \\* form only, or use named commands only in the beginning of a line ending with a semicolon (;) Since version 10.9 the client now starts with this option ENABLED by default! Disable with '-G'. Long format commands still work from the first line. WARNING: option depricated; use --disable-named-commands instead.",
0,0,0,GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
{"named-commands",'G',
"Enable named commands. Disable with --disable-named-commands. This option is disabled by default.",
"Don't write column names in results. WARNING: -N is depricated, use long version of this options instead.",
{"host",required_argument,0,'h'},
0,0,0,GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
{"ignore-spaces",no_argument,0,'i'},
{"set-variable",'O',
{"no-auto-rehash",no_argument,0,'A'},
"Change the value of a variable. Please note that this option is depricated; you can set variables directly with --variable-name=value.",
{"no-named-commands",no_argument,0,'g'},
0,0,0,GET_STR,REQUIRED_ARG,0,0,0,0,0,0},
{"no-tee",no_argument,0,OPT_NOTEE},
{"one-database",'o',
"Only update the default database. This is useful for skipping updates to other database in the update log.",
0,0,0,GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
#ifndef __WIN__
#ifndef __WIN__
{"no-pager",no_argument,0,OPT_NOPAGER},
{"pager",OPT_PAGER,
{"nopager",no_argument,0,OPT_NOPAGER},/* we are kind */
"Pager to use to display results. If you don't supply an option the default pager is taken from your ENV variable PAGER. Valid pagers are less, more, cat [> filename], etc. See interactive help (\\h) also. This option does not work in batch mode.",
{"pager",optional_argument,0,OPT_PAGER},
0,0,0,GET_STR,OPT_ARG,0,0,0,0,0,0},
#endif
#endif
{"notee",no_argument,0,OPT_NOTEE},/* we are kind */
{"password",'p',
{"tee",required_argument,0,OPT_TEE},
"Password to use when connecting to server. If password is not given it's asked from the tty.",
{"one-database",no_argument,0,'o'},
0,0,0,GET_STR,OPT_ARG,0,0,0,0,0,0},
{"password",optional_argument,0,'p'},
#ifdef __WIN__
#ifdef __WIN__
{"pipe",no_argument,0,'W'},
{"pipe",'W',"Use named pipes to connect to server.",0,0,0,GET_NO_ARG,
NO_ARG,0,0,0,0,0,0},
#endif
#endif
{"port",required_argument,0,'P'},
{"port",'P',"Port number to use for connection.",0,0,0,
{"quick",no_argument,0,'q'},
GET_LONG,REQUIRED_ARG,0,0,0,0,0,0},
{"set-variable",required_argument,0,'O'},
{"quick",'q',
{"raw",no_argument,0,'r'},
"Don't cache result, print it row by row. This may slow down the server if the output is suspended. Doesn't use history file. ",
puts("Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB");
puts("Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB");
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");
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");
puts("Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB");
puts("Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB");
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");
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");
puts("Administration program for the mysqld daemon.");
puts("Administration program for the mysqld daemon.");
{"analyze",'a',"Analyze given tables.",0,0,0,GET_NO_ARG,NO_ARG,0,0,
{"check",no_argument,0,'c'},
0,0,0,0},
{"check-only-changed",no_argument,0,'C'},
{"all-in-1",'1',
{"compress",no_argument,0,OPT_COMPRESS},
"Instead of making one query for each table, execute all queries in 1 query separately for each database. Table names will be in a comma separeted list.",
"If you are using this option with CHECK TABLE, it will ensure that the table is 100 percent consistent, but will take a long time. If you are using this option with REPAIR TABLE, it will run an extended repair on the table, which may not only take a long time to execute, but may produce a lot of garbage rows also!",
"Password to use when connecting to server. If password is not given it's solicited on the tty.",
0,0,0,GET_STR,OPT_ARG,0,0,0,0,0,0},
#ifdef __WIN__
#ifdef __WIN__
{"pipe",no_argument,0,'W'},
{"pipe",'W',"Use named pipes to connect to server.",0,0,0,GET_NO_ARG,
NO_ARG,0,0,0,0,0,0},
#endif
#endif
{"port",required_argument,0,'P'},
{"port",'P',"Port number to use for connection.",0,0,0,GET_LONG,
{"quick",no_argument,0,'q'},
REQUIRED_ARG,0,0,0,0,0,0},
{"repair",no_argument,0,'r'},
{"quick",'q',
{"silent",no_argument,0,'s'},
"If you are using this option with CHECK TABLE, it prevents the check from scanning the rows to check for wrong links. This is the fastest check. If you are using this option with REPAIR TABLE, it will try to repair only the index tree. This is the fastest repair method for a table.",
"To dump several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames. 'USE db_name;' will be included in the output.",
"'/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and '/*!40000 ALTER TABLE tb_name ENABLE KEYS */; will be put in the output.",(gptr*)&opt_disable_keys,
"'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;' will not be put in the output. The above line will be added otherwise, if --databases or --all-databases option was given.}",
"Direct output to a given file. This option should be used in MSDOS, because it prevents new line '\\n' from being converted to '\\n\\r' (newline + carriage return).",
"Creates tab separated textfile for each table to given path. (creates .sql and .txt files). NOTE: This only works if mysqldump is run on the same machine as the mysqld daemon.",
{"user",'u',"User for login if not current user.",(gptr*)&user,
(gptr*)&user,0,GET_STR,REQUIRED_ARG,0,0,0,0,0,0},
#endif
#endif
{"verbose",no_argument,0,'v'},
{"verbose",'v',
{"version",no_argument,0,'V'},
"More verbose output; You can use this multiple times to get even more verbose output.",
{0,0,0,0}
0,0,0,GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
{"version",'V',"Output version information and exit.",0,0,0,GET_NO_ARG,
NO_ARG,0,0,0,0,0,0},
{0,0,0,0,0,0,GET_NO_ARG,NO_ARG,0,0,0,0,0,0}
};
};
staticvoidprint_version(void)
staticvoidprint_version(void)
{
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,SHOW_VERSION,
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,SHOW_VERSION,
...
@@ -160,33 +180,6 @@ static void usage(void)
...
@@ -160,33 +180,6 @@ static void usage(void)
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");
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");
puts("Shows the structure of a mysql database (databases,tables and columns)\n");
puts("Shows the structure of a mysql database (databases,tables and columns)\n");
"Try to recover every possible row from the data file. Normally this will also find a lot of garbage rows; Don't use this option if you are not totally desperate.",0,0,0,GET_NO_ARG,NO_ARG,'e',0,0,0,0,0,0},
"Try to recover every possible row from the data file. Normally this will also find a lot of garbage rows; Don't use this option if you are not totally desperate.",0,0,0,GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
{"fast","Check only tables that hasn't been closed properly.",0,0,0,
{"fast",'F',"Check only tables that hasn't been closed properly.",0,0,0,
GET_NO_ARG,NO_ARG,'F',0,0,0,0,0,0},
GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
{"force",
{"force",'f',
"Restart with -r if there are any errors in the table. States will be updated as with --update-state.",0,0,0,GET_NO_ARG,NO_ARG,'f',0,0,0,0,0,
"Restart with -r if there are any errors in the table. States will be updated as with --update-state.",0,0,0,GET_NO_ARG,NO_ARG,0,0,0,0,0,
0},
0},
{"help","Display this help and exit.",0,0,0,GET_NO_ARG,NO_ARG,'?',0,
{"help",'?',"Display this help and exit.",0,0,0,GET_NO_ARG,NO_ARG,0,
0,0,0,0,0},
0,0,0,0,0},
{"information","Print statistics information about table that is checked.",
{"information",'i',
0,0,0,GET_NO_ARG,NO_ARG,'i',0,0,0,0,0,0},
"Print statistics information about table that is checked.",0,0,0,
{"keys-used","Tell MyISAM to update only some specific keys. # is a bit mask of which keys to use. This can be used to get faster inserts!",
GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
{"keys-used",'k',
"Tell MyISAM to update only some specific keys. # is a bit mask of which keys to use. This can be used to get faster inserts!",
"Faster than extended-check, but only finds 99.99% of all errors. Should be good enough for most cases.",0,0,0,GET_NO_ARG,NO_ARG,'m',0,0,0,0,0,
"Faster than extended-check, but only finds 99.99% of all errors. Should be good enough for most cases.",0,0,0,GET_NO_ARG,NO_ARG,0,0,0,0,0,
0},
0},
{"quick","Faster repair by not modifying the data file.",0,0,0,
{"quick",'q',"Faster repair by not modifying the data file.",0,0,0,
GET_NO_ARG,NO_ARG,'q',0,0,0,0,0,0},
GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
{"read-only","Don't mark table as checked.",0,0,0,GET_NO_ARG,NO_ARG,
{"read-only",'T',"Don't mark table as checked.",0,0,0,GET_NO_ARG,
'T',0,0,0,0,0,0},
NO_ARG,0,0,0,0,0,0},
{"recover",
{"recover",'r',
"Can fix almost anything except unique keys that aren't unique.",0,0,0,
"Can fix almost anything except unique keys that aren't unique.",0,0,0,
GET_NO_ARG,NO_ARG,'r',0,0,0,0,0,0},
GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
{"safe-recover",
{"safe-recover",'o',
"Uses old recovery method; Slower than '-r' but can handle a couple of cases where '-r' reports that it can't fix the data file.",0,0,0,GET_NO_ARG,
"Uses old recovery method; Slower than '-r' but can handle a couple of cases where '-r' reports that it can't fix the data file.",0,0,0,GET_NO_ARG,
NO_ARG,'o',0,0,0,0,0,0},
NO_ARG,0,0,0,0,0,0},
{"start-check-pos","No help available.",0,0,0,GET_LONG,REQUIRED_ARG,
{"start-check-pos",OPT_START_CHECK_POS,"No help available.",0,0,0,
OPT_START_CHECK_POS,0,0,0,0,0,0},
GET_LONG,REQUIRED_ARG,0,0,0,0,0,0},
{"set-auto-increment",
{"set-auto-increment",'A',
"Force auto_increment to start at this or higher value. If no value is given, then sets the next auto_increment value to the highest used value for the auto key + 1.",(gptr*)&check_param.auto_increment_value,
"Force auto_increment to start at this or higher value. If no value is given, then sets the next auto_increment value to the highest used value for the auto key + 1.",(gptr*)&check_param.auto_increment_value,
"Change the character set used by the index",0,0,0,GET_STR,
{"set-variable","Change the value of a variable. Please note that this option is depricated; you can set variables directly with --variable-name=value.",
REQUIRED_ARG,0,0,0,0,0,0},
0,0,0,GET_STR,REQUIRED_ARG,'O',0,0,0,0,0,0},
{"set-variable",'O',
{"silent",
"Change the value of a variable. Please note that this option is depricated; you can set variables directly with --variable-name=value.",
0,0,0,GET_STR,REQUIRED_ARG,0,0,0,0,0,0},
{"silent",'s',
"Only print errors. One can use two -s to make myisamchk very silent.",0,
"Only print errors. One can use two -s to make myisamchk very silent.",0,
0,0,GET_NO_ARG,NO_ARG,'s',0,0,0,0,0,0},
0,0,GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
{"sort-index",
{"sort-index",'S',
"Sort index blocks. This speeds up 'read-next' in applications.",0,0,0,
"Sort index blocks. This speeds up 'read-next' in applications.",0,0,0,
GET_NO_ARG,NO_ARG,'S',0,0,0,0,0,0},
GET_NO_ARG,NO_ARG,0,0,0,0,0,0},
{"sort-records",
{"sort-records",'R',
"Sort records according to an index. This makes your data much more localized and may speed up things. (It may be VERY slow to do a sort the first time!)",
"Sort records according to an index. This makes your data much more localized and may speed up things. (It may be VERY slow to do a sort the first time!)",