summaryrefslogtreecommitdiff
path: root/sql/wsrep_schema.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/wsrep_schema.cc')
-rw-r--r--sql/wsrep_schema.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/wsrep_schema.cc b/sql/wsrep_schema.cc
index 48077040f88..3d90f425ec8 100644
--- a/sql/wsrep_schema.cc
+++ b/sql/wsrep_schema.cc
@@ -623,9 +623,11 @@ static int init_for_index_scan(TABLE* table, const uchar* key,
*/
static int end_index_scan(TABLE* table) {
int error;
- if ((error= table->file->ha_index_end())) {
- WSREP_ERROR("Failed to end scan: %d", error);
- return 1;
+ if (table->file->inited) {
+ if ((error= table->file->ha_index_end())) {
+ WSREP_ERROR("Failed to end scan: %d", error);
+ return 1;
+ }
}
return 0;
}