summaryrefslogtreecommitdiff
path: root/storage/maria/ha_maria.h
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-03-28 13:49:07 +0300
committerMichael Widenius <monty@askmonty.org>2012-03-28 13:49:07 +0300
commit3bc932ec175ae9ac2fc6c0c5be29002819c9b102 (patch)
tree142e8c1fdf2e1cd20740c27716b4fb692895db41 /storage/maria/ha_maria.h
parentc88e2679c60f56719b6d347c30374e69ffd3d5c4 (diff)
parent74b064933267f58b9201c46eb67454237d7664d3 (diff)
downloadmariadb-git-3bc932ec175ae9ac2fc6c0c5be29002819c9b102.tar.gz
Merge with 5.1
Diffstat (limited to 'storage/maria/ha_maria.h')
-rw-r--r--storage/maria/ha_maria.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/storage/maria/ha_maria.h b/storage/maria/ha_maria.h
index 2cfa2d8cd9b..8062b235d7d 100644
--- a/storage/maria/ha_maria.h
+++ b/storage/maria/ha_maria.h
@@ -136,8 +136,14 @@ public:
bool check_and_repair(THD * thd);
bool is_crashed() const;
bool is_changed() const;
- bool auto_repair() const
- { return test(maria_recover_options & HA_RECOVER_ANY); }
+ bool auto_repair(int error) const
+ {
+ /* Always auto-repair moved tables (error == HA_ERR_OLD_FILE) */
+ return ((test(maria_recover_options & HA_RECOVER_ANY) &&
+ error == HA_ERR_CRASHED_ON_USAGE) ||
+ error == HA_ERR_OLD_FILE);
+
+ }
int optimize(THD * thd, HA_CHECK_OPT * check_opt);
int restore(THD * thd, HA_CHECK_OPT * check_opt);
int backup(THD * thd, HA_CHECK_OPT * check_opt);