blobs are needed to be decoded.

Try using PostgreSQL.

CommentFileSizeAuthor
project issue db decode blob.patch.txt1.65 KBdoq

Comments

dww’s picture

Status: Needs review » Needs work

yeah, that does seem to help on a pgsql test site. ;) i'm confused, however, why there are practically *no* calls to this function in the entire drupal core and all the other contribs i use regularly -- seems like there would be dozens of bugs like this on pgsql, no?

that said, the patch has got some superfluous comments in there that should be cleaned up before this is committed. if you care to roll a new patch that *just* has the code as it should be (so long as you use "diff -u -F^f", i'll have all the context i need to see what lines you've changed, etc) without any commented-out lines of code, etc, i'll look into committing this.

but, i'd really like to understand if this db_decode_blob() stuff is really the right solution at all the call sites, or if somethine else should be happening instead...

thanks for the patch!
-derek

p.s. it seems that there are a bunch of pgsql problems in project/project_issues. i was going to have to care a lot, but it turns out the site where i'm running project for my day job can remain at mysql. so, at this point, pgsql support is lower priority for me (though that might change). if you care about pgsql support, please submit more patches for pgsql compatibility. i've got a good test environment setup, at least, so i can quickly verify the patches are good, work on both pgsql and msql, and commit them. thanks.

doq’s picture

The only use of bytea in Drupal - is cache.data field. I see that it is decoded in cache_get() function.
So the next problem - why using bytea? why not TEXT, like 'node_revisions' do.

dww’s picture

Status: Needs work » Fixed

cleaned up the patch, tested, and committed to DRUPAL-4-7 and DRUPAL-4-7--2.

re: So the next problem - why using bytea? why not TEXT, like 'node_revisions' do.

good question. ;) please submit this as a separate issue, since the fix would have to be much more invasive (a new project_issue_update_N() to convert, etc, etc).

thanks,
-derek

Anonymous’s picture

Status: Fixed » Closed (fixed)