Closed (works as designed)
Project:
Drupal core
Version:
6.22
Component:
cache system
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Aug 2011 at 08:42 UTC
Updated:
9 Aug 2011 at 09:32 UTC
Hi, I think that this is trivial, but if you see the core function cache_get() in includes/cache.inc you can view that not use 100% placeholders (only use 2 of 3 :/) in 2 SQL querys, see lines 22 and 25 in includes/cache.inc, look at $table var:
db_query("DELETE FROM {". $table ."} WHERE expire != %d AND expire <= %d", CACHE_PERMANENT, $cache_flush);
}
$cache = db_fetch_object(db_query("SELECT data, created, headers, expire, serialized FROM {". $table ."} WHERE cid = '%s'", $cid));
This is ok? You should use all replacements when needed variables in SQL queries, no?
Comments
Comment #1
damien tournoud commentedThose are (sanitized) table names. Placeholders are for values, not identifiers.