Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
ping.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Nov 2008 at 13:59 UTC
Updated:
20 Nov 2009 at 07:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
Wesley Tanaka commentedComment #2
brianV commentedTested, and looks good.
Ping module is not in core in D7, so this should go straight into D6.
Comment #3
gábor hojtsyIs this better because changed has an index, but created does not? (I did not look that up). Also, can we have the comment capitalized and have a dot at the end?
Comment #4
Wesley Tanaka commentedBoth changed and created have indexes, but whatever versions of MySQL that I have tried do not make this optimization of splitting the OR clause into two separate queries to avoid the full table scan.
The order of the queries is just a heuristic to try to get the second query to be short-circuited out most of the time.
Patch file edited directly to capitalize comment and add a period
Comment #5
gábor hojtsyWhy are we not using our %d placeholder in the query then?
Comment #6
brianV commented@Gabor,
That was an oversight when I initially RTBC'd this. I have fixed that in this version.
Comment #7
Wesley Tanaka commentedI did not originally use %d placeholders because the original code did not use %d placeholders.
Given that we're cleaning that up, I'd also suggest switching the double quoted strings to single quoted ones (single quotes being faster). I have edited the patch to do this and am attaching it here.
Otherwise this %d version of the patch looks good to me.
Comment #8
gábor hojtsyThanks, committed to Drupal 6.