summaryrefslogtreecommitdiff
path: root/sql/ha_myisam.cc
diff options
context:
space:
mode:
authorunknown <monty@work.mysql.com>2001-09-18 04:17:52 +0200
committerunknown <monty@work.mysql.com>2001-09-18 04:17:52 +0200
commit53e09c98389e0b1e8d032e63f6c35dcd9cc06b38 (patch)
tree63012919b5be7bd7ba87583c4a399657e6ab81f1 /sql/ha_myisam.cc
parent74bec0517bfb1141f3a6b2709aa9b52c963eb3c7 (diff)
parentc91a3df5c38ee5f4ebc7e42f0c17da79d4930801 (diff)
downloadmariadb-git-53e09c98389e0b1e8d032e63f6c35dcd9cc06b38.tar.gz
Merge work.mysql.com:/home/bk/mysql
into work.mysql.com:/home/bk/mysql-4.0 Docs/manual.texi: Auto merged extra/perror.c: Auto merged include/myisam.h: Auto merged myisam/mi_check.c: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/t/rpl000017-slave.sh: Auto merged sql/ha_myisam.cc: Auto merged sql/handler.cc: Auto merged sql/slave.cc: Auto merged
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r--sql/ha_myisam.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index 62ba76ab792..812e0b77077 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -374,8 +374,10 @@ int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt)
char* backup_dir = thd->lex.backup_dir;
char src_path[FN_REFLEN], dst_path[FN_REFLEN];
char* table_name = table->real_name;
+ DBUG_ENTER("restore");
+
if (!fn_format(src_path, table_name, backup_dir, MI_NAME_DEXT, 4 + 64))
- return HA_ADMIN_INVALID;
+ DBUG_RETURN(HA_ADMIN_INVALID);
int error = 0;
const char* errmsg = "";
@@ -390,8 +392,8 @@ int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt)
tmp_check_opt.init();
tmp_check_opt.quick = 1;
- tmp_check_opt.flags |= T_VERY_SILENT;
- return repair(thd, &tmp_check_opt);
+ tmp_check_opt.flags |= T_VERY_SILENT | T_CALC_CHECKSUM;
+ DBUG_RETURN(repair(thd, &tmp_check_opt));
err:
{
@@ -403,7 +405,7 @@ int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt)
param.table_name = table->table_name;
param.testflag = 0;
mi_check_print_error(&param,errmsg, errno );
- return error;
+ DBUG_RETURN(error);
}
}
@@ -474,7 +476,7 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt)
myisamchk_init(&param);
param.thd = thd;
param.op_name = (char*) "repair";
- param.testflag = ((check_opt->flags & ~T_EXTEND) |
+ param.testflag = ((check_opt->flags & ~(T_EXTEND)) |
T_SILENT | T_FORCE_CREATE |
(check_opt->flags & T_EXTEND ? T_REP : T_REP_BY_SORT));
if (check_opt->quick)