Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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)
Comment | File | Size | Author |
---|---|---|---|
#2 | drupal_2040571_2.patch | 856 bytes | Xano |
#1 | drupal_2040571_1.patch | 523 bytes | Xano |
Comments
Comment #1
XanoLike this?
Comment #2
XanoIncorporated catch's feedback from IRC, and patched the upgrade path as well.
Comment #3
catchComment #4
dawehnerThere 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.
Comment #5
catchCommitted/pushed to 8.x, thanks!