diff options
author | Sergey Vojtovich <svoj@sun.com> | 2010-03-10 16:32:12 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@sun.com> | 2010-03-10 16:32:12 +0400 |
commit | 1e92b0fbe8e58d4a4314030f743ac37547c9e3ec (patch) | |
tree | 04dd466216c060c976ff054beee8051a6dc1519c /storage | |
parent | 64c6882ea9a18820abc75b7a5993953e06bbbcdb (diff) | |
parent | 1613b3e1ddf5785e912998cafc29afaf2ac8ecf2 (diff) | |
download | mariadb-git-1e92b0fbe8e58d4a4314030f743ac37547c9e3ec.tar.gz |
Merge fix for BUG51307 to 5.1-bugteam.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/myisam/ha_myisam.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 9c913b4f14d..12557b75cc1 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -1448,9 +1448,17 @@ int ha_myisam::enable_indexes(uint mode) { sql_print_warning("Warning: Enabling keys got errno %d on %s.%s, retrying", my_errno, param.db_name, param.table_name); - /* Repairing by sort failed. Now try standard repair method. */ - param.testflag&= ~(T_REP_BY_SORT | T_QUICK); - error= (repair(thd,param,0) != HA_ADMIN_OK); + /* + Repairing by sort failed. Now try standard repair method. + Still we want to fix only index file. If data file corruption + was detected (T_RETRY_WITHOUT_QUICK), we shouldn't do much here. + Let implicit repair do this job. + */ + if (!(param.testflag & T_RETRY_WITHOUT_QUICK)) + { + param.testflag&= ~T_REP_BY_SORT; + error= (repair(thd,param,0) != HA_ADMIN_OK); + } /* If the standard repair succeeded, clear all error messages which might have been set by the first repair. They can still be seen |