From c91a3df5c38ee5f4ebc7e42f0c17da79d4930801 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Sep 2001 04:58:15 +0300 Subject: 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 --- sql/ha_myisam.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sql/ha_myisam.cc') 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(¶m,errmsg, errno ); - return error; + DBUG_RETURN(error); } } @@ -474,7 +476,7 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt) myisamchk_init(¶m); 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) -- cgit v1.2.1