diff options
author | unknown <jani@rhols221.adsl.netsonic.fi> | 2002-10-17 19:34:02 +0300 |
---|---|---|
committer | unknown <jani@rhols221.adsl.netsonic.fi> | 2002-10-17 19:34:02 +0300 |
commit | 619232cc8b1e9a5c6da9145e46dddae999cec260 (patch) | |
tree | 40e4fbbfe26e2adba45161310511b8d0cd81461e | |
parent | b863b75a60d163ae9698f6a7492288d5ca3a1ed0 (diff) | |
download | mariadb-git-619232cc8b1e9a5c6da9145e46dddae999cec260.tar.gz |
Fixed three bugs in mysqlcheck and changed documentation for mysqld_multi
client/mysqlcheck.c:
Fixed three bugs in mysqlcheck:
1. mysqlcheck died with error Got error: 1103: Incorrect table name when
executing 'REPAIR TABLE'
2. --auto-repair used together with --all-in-1 (-1) tried to fix next table
in a row, independent whether the next table was OK or corrupted, in case an
error was found from a previous table and the previous table remained unfixed.
3. --auto-repair didn't work at all when -1 option wasn't used; broken tables
were not noticed at all.
scripts/mysqld_multi.sh:
Changed documentation
-rw-r--r-- | client/mysqlcheck.c | 16 | ||||
-rw-r--r-- | scripts/mysqld_multi.sh | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 394555f37a9..24b67a60255 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -16,7 +16,7 @@ /* By Jani Tolonen, 2001-04-20, MySQL Development Team */ -#define CHECK_VERSION "2.4.1" +#define CHECK_VERSION "2.4.2" #include "client_priv.h" #include <m_ctype.h> @@ -463,7 +463,7 @@ static int handle_request_for_tables(char *tables, uint length) if (!(query =(char *) my_malloc((sizeof(char)*(length+110)), MYF(MY_WME)))) return 1; - sprintf(query, "%s TABLE `%s` %s", op, tables, options); + sprintf(query, "%s TABLE %s %s", op, tables, options); if (mysql_query(sock, query)) { sprintf(message, "when executing '%s TABLE `%s` %s", op, tables,options); @@ -493,12 +493,9 @@ static void print_result() if (status) { - if (found_error) - { - if (what_to_do != DO_REPAIR && opt_auto_repair && - (!opt_fast || strcmp(row[3],"OK"))) - insert_dynamic(&tables4repair, row[0]); - } + if (found_error && opt_auto_repair && what_to_do != DO_REPAIR && + (!opt_fast || strcmp(row[3],"OK"))) + insert_dynamic(&tables4repair, prev); found_error=0; if (opt_silent) continue; @@ -515,6 +512,9 @@ static void print_result() strmov(prev, row[0]); putchar('\n'); } + if (found_error && opt_auto_repair && what_to_do != DO_REPAIR && + (!opt_fast || strcmp(row[3],"OK"))) + insert_dynamic(&tables4repair, prev); mysql_free_result(res); } diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 1366a9ea713..b868006ee40 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -4,7 +4,7 @@ use Getopt::Long; use POSIX qw(strftime); $|=1; -$VER="2.3"; +$VER="2.4"; $opt_config_file = undef(); $opt_example = 0; @@ -508,8 +508,8 @@ sub example [mysqld_multi] mysqld = @bindir@/mysqld_safe mysqladmin = @bindir@/mysqladmin -user = multi_admin -password = multipass +user = root +password = your_password [mysqld2] socket = /tmp/mysql.sock2 |