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}.

Files: 
CommentFileSizeAuthor
system-date-format-type-query-cleanup.patch945 bytesalippai
PASSED: [[SimpleTest]]: [MySQL] 39,398 pass(es).
[ View ]

Comments

chx’s picture

Status:Needs review» Reviewed & tested by the community

Looks legit.

webchick’s picture

Status:Reviewed & tested by the community» Fixed

Did 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!

Status:Fixed» Closed (fixed)

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