Follow-up to #2542124: Drupal\views\Tests\Handler\FieldFieldTest fails on Postgres

Drupal test run
---------------

Tests to be run:
  - Drupal\node\Tests\Views\RevisionRelationshipsTest

Test run started:
  Wednesday, July 29, 2015 - 15:21

Test summary
------------

Drupal\node\Tests\Views\RevisionRelationshipsTest              2 passes   1 fails
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott’s picture

Sort missing :)

bzrudi71’s picture

Status: Needs review » Reviewed & tested by the community

Testet locally and tests pass now. Thanks @alex for the quick fix!

alexpott’s picture

Slight c&p fail :(

catch’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Since this adds a sort, I took a look at the indexes on node_field_revision:

MariaDB [d8]> SHOW INDEXES FROM node_field_revision;
+---------------------+------------+--------------------------------------+--------------+------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table               | Non_unique | Key_name                             | Seq_in_index | Column_name      | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+---------------------+------------+--------------------------------------+--------------+------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| node_field_revision |          0 | PRIMARY                              |            1 | vid              | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| node_field_revision |          0 | PRIMARY                              |            2 | langcode         | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| node_field_revision |          1 | node__id__default_langcode__langcode |            1 | nid              | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| node_field_revision |          1 | node__id__default_langcode__langcode |            2 | default_langcode | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| node_field_revision |          1 | node__id__default_langcode__langcode |            3 | langcode         | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| node_field_revision |          1 | node_field__uid__target_id           |            1 | uid              | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+---------------------+------------+--------------------------------------+--------------+------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
6 rows in set (0.00 sec)

Looks like it would be useful to add an index on nid, vid in case a real life view was set up like this. I'll open a follow-up.

Went to commit the patch, but it doesn't apply?

catch’s picture

alexpott’s picture

Status: Needs work » Reviewed & tested by the community

Patch in #3 applies fine for me.

alexpott queued 3: 2542128.3.patch for re-testing.

  • catch committed 6952745 on 8.0.x
    Issue #2542128 by alexpott: Drupal\node\Tests\Views\...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Not sure why I couldn't get this apply before, but now can.

Committed/pushed to 8.0.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.