Commit fd7a6c0c authored by Alexander Varwijk's avatar Alexander Varwijk Committed by Thomas Seidl
Browse files

Issue #3324776 by Kingdutch, drunken monkey: Fixed duplicate tables created by DB backend.

parent 1205ca43
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
Search API 1.x, dev (xxxx-xx-xx):
---------------------------------
- #3324776 by Kingdutch, drunken monkey: Fixed duplicate tables created by DB
  backend.
- #3267092 by drunken monkey: Fixed stemming of content with invalid language
  codes.
- #3352134 by drunken monkey: Fixed performance degradation with database
+3 −1
Original line number Diff line number Diff line
@@ -1258,10 +1258,10 @@ class Database extends BackendPluginBase implements AutocompleteBackendInterface
   *   method.
   */
  protected function indexItem(IndexInterface $index, ItemInterface $item) {
    $fields = $this->getFieldInfo($index);
    $fields_updated = FALSE;
    $field_errors = [];
    $db_info = $this->getIndexDbInfo($index);
    $fields = $db_info['field_tables'];
    $denormalized_table = $db_info['index_table'];
    $item_id = $item->getId();

@@ -1285,6 +1285,8 @@ class Database extends BackendPluginBase implements AutocompleteBackendInterface
          unset($db_info['field_tables'][$field_id]);
          $this->fieldsUpdated($index);
          $fields_updated = TRUE;
          // Reload DB info because fieldsUpdated() may have changed it.
          $db_info = $this->getIndexDbInfo($index);
          $fields = $db_info['field_tables'];
        }
        if (empty($fields[$field_id]['table']) && empty($field_errors[$field_id])) {