Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.3
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Sep 2008 at 16:34 UTC
Updated:
14 Jul 2012 at 19:39 UTC
Jump to comment: Most recent file
Comments
Comment #1
aaaristo commenteduploading updated patch.. there was some debugging code left in the previous one..
Comment #2
merlinofchaos commentedIt's my understanding that %b and blob handling only need to happen if the data is binary; serialized strings, which is what all of this uses, are text and therefore do not require blob decoding.
Comment #3
Crell commented%b needs to be used if the field being stored into is of type BLOB, regardless of whether the data being stored is binary or string data. (Or rather, should be used. Whether or not the site will break on Postgres if you don't I am not sure. MySQL doesn't care either way.)
Comment #4
aaaristo commentedstill some debug code cleanup
Comment #5
merlinofchaos commentedI don't think this is right the profile_values table is not a blob.
Comment #6
aaaristo commentedok removed.
Comment #7
merlinofchaos commentedCommitted. Thanks!
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #9
aaaristo commentedSome one removed the db_decode_blob here:
includes/cache.inc line 214
views_object_cache_get :
function views_object_cache_get($obj, $name, $skip_cache = FALSE) {
static $cache = array();
$key = "$obj:$name";
if ($skip_cache) {
unset($cache[$key]);
}
if (!array_key_exists($key, $cache)) {
$data = db_fetch_object(db_query("SELECT * FROM {views_object_cache} WHERE sid = '%s' AND obj = '%s' AND name = '%s'", session_id(), $obj, $name));
if ($data) {
$cache[$key] = unserialize(db_decode_blob($data->data)); // <<<<<<<<<<<<<--------- must call db_decode_blob
}
}
return isset($cache[$key]) ? $cache[$key] : NULL;
}
Comment #10
merlinofchaos commentedThat one has already been removed in -dev.
Comment #11
aaaristo commentedI checked the -dev and is still there:
this is buggy code -> $cache[$key] = unserialize($data->data);
The data column is a blob and the db_decode_blob should be used:
$cache[$key] = unserialize(db_decode_blob($data->data));
else will not work with pgsql and any other database that is not mysql.
Comment #12
merlinofchaos commentedviews_object_cache has had its type changed from blob to text.
Comment #13
merlinofchaos commented