Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
system.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2012 at 20:45 UTC
Updated:
15 Oct 2012 at 00:51 UTC
There is an unnecessary LEFT JOIN in a static query. The LEFT JOIN returns all rows from the left table {date_format}, even if there are no matches in the right table {date_format_type}.
| Comment | File | Size | Author |
|---|---|---|---|
| system-date-format-type-query-cleanup.patch | 945 bytes | alippai |
Comments
Comment #1
chx commentedLooks legit.
Comment #2
webchickDid some digging through git blame, this line was introduced in #11623-26: Localize date formats. I didn't read that whole issue, but I don't see any reference to the word "join" there at all, which implies that either this wasn't spotted during reviews, or there was no special reason why this was added, or both. So *should* be safe, since that patch also introduced a bunch of tests for this functionality.
Committed and pushed to 8.x (applied with offset) and 7.x. Thanks!