Saw the query in #2036241: Routing system cannot handle /foo/bar and /foo/{baz} and wondered what the indexes where, turns out this isn't covered properly.

mysql> EXPLAIN SELECT * FROM router WHERE pattern_outline IN ('foo') ORDER BY fit DESC;
+----+-------------+--------+------+-----------------+-----------------+---------+-------+------+----------------------------------------------------+
| id | select_type | table  | type | possible_keys   | key             | key_len | ref   | rows | Extra                                              |
+----+-------------+--------+------+-----------------+-----------------+---------+-------+------+----------------------------------------------------+
|  1 | SIMPLE      | router | ref  | pattern_outline | pattern_outline | 767     | const |    1 | Using index condition; Using where; Using filesort |
+----+-------------+--------+------+-----------------+-----------------+---------+-------+------+----------------------------------------------------+
1 row in set (0.00 sec)
CommentFileSizeAuthor
#2 drupal_2040571_2.patch856 bytesXano
#1 drupal_2040571_1.patch523 bytesXano
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xano’s picture

Status: Active » Needs review
FileSize
523 bytes

Like this?

Xano’s picture

FileSize
856 bytes

Incorporated catch's feedback from IRC, and patched the upgrade path as well.

catch’s picture

Issue tags: +Stalking Crell
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

There should be just two possible queryes: getRoutesByName() which is covered by the primary and the query mentioned above.

You would get extra points for providing an explain after the patch.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

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