diff options
Diffstat (limited to 'sql/wsrep_schema.cc')
-rw-r--r-- | sql/wsrep_schema.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/wsrep_schema.cc b/sql/wsrep_schema.cc index fe45c4d1711..591a2f17bc2 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; } |