summaryrefslogtreecommitdiff
path: root/myisam/mi_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'myisam/mi_open.c')
-rw-r--r--myisam/mi_open.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index cb19011fea7..942b4cee491 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -174,9 +174,10 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
disk_pos=my_n_base_info_read(disk_cache+base_pos, &share->base);
share->state.state_length=base_pos;
- if ((open_flags & HA_OPEN_ABORT_IF_CRASHED) &&
+ if (!(open_flags & HA_OPEN_FOR_REPAIR) &&
((share->state.changed & STATE_CRASHED) ||
- (my_disable_locking && share->state.open_count)))
+ ((open_flags & HA_OPEN_ABORT_IF_CRASHED) &&
+ (my_disable_locking && share->state.open_count))))
{
DBUG_PRINT("error",("Table is marked as crashed"));
my_errno=((share->state.changed & STATE_CRASHED_ON_REPAIR) ?