summaryrefslogtreecommitdiff
path: root/storage/maria
diff options
context:
space:
mode:
Diffstat (limited to 'storage/maria')
-rw-r--r--storage/maria/ha_maria.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index 5a371a07fc3..f64ea4b1edb 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -2798,9 +2798,12 @@ int ha_maria::external_lock(THD *thd, int lock_type)
}
}
} /* if transactional table */
- DBUG_RETURN(maria_lock_database(file, !table->s->tmp_table ?
+ int result = maria_lock_database(file, !table->s->tmp_table ?
lock_type : ((lock_type == F_UNLCK) ?
- F_UNLCK : F_EXTRA_LCK)));
+ F_UNLCK : F_EXTRA_LCK));
+ if (!file->s->base.born_transactional)
+ file->state= &file->s->state.state; // Restore state if clone
+ DBUG_RETURN(result);
}
int ha_maria::start_stmt(THD *thd, thr_lock_type lock_type)