summaryrefslogtreecommitdiff
path: root/sql/ha_myisam.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-09-18 04:58:15 +0300
committerunknown <monty@hundin.mysql.fi>2001-09-18 04:58:15 +0300
commitc91a3df5c38ee5f4ebc7e42f0c17da79d4930801 (patch)
tree4ac99859c8cc85b07cbaadfa18dc36026c886644 /sql/ha_myisam.cc
parent9d62e4a05b1c8399787b624a90e0cab0aa42c57c (diff)
downloadmariadb-git-c91a3df5c38ee5f4ebc7e42f0c17da79d4930801.tar.gz
Fix for LOAD DATA FROM MASTER when using tables with checksum
Fixed some wrong test cases Docs/manual.texi: Changelog extra/perror.c: Added BDB table errors include/myisam.h: Fix for LOAD DATA FROM MASTER when using tables with checksum myisam/mi_check.c: Fix for LOAD DATA FROM MASTER when using tables with checksum mysql-test/mysql-test-run.sh: Better logging mysql-test/r/join.result: Fixed missing results mysql-test/r/rpl000006.result: Updated result mysql-test/t/join.test: Fixed wrong test mysql-test/t/rpl000001.test: Fixed wrong test mysql-test/t/rpl000006.test: Cleanup mysql-test/t/rpl000017-slave.sh: Fixed too long password mysql-test/t/rpl000017.test: Fixed too long password sql/ha_myisam.cc: Fix for LOAD DATA FROM MASTER when using tables with checksum sql/handler.cc: Unique error for DEADLOCK sql/slave.cc: Fix for LOAD DATA FROM MASTER when using tables with checksum
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 a429d5308dd..c5c29f3c8bc 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)