Error message

You need to log in or create an account to access this page.

The logic to break up a query in db_rewrite_query() has a minor bug in that it doesn't list _ as a valid extension to the FROM keyword, which means that the function FROM_UNIXTIME utterly breaks when node access is enabled. The attached patch adds a _ to the characters that can't follow the FROM keyword to make it a delimiter.

I took this patch against a version from CVS that I downloaded a couple of weeks ago. I doubt database.inc has changed enough that this patch won't work, but you never can tell. It should be extremely easy to apply manually if the patch fails, as it's a 1 character change in db_rewrite_sql() in database.inc

CommentFileSizeAuthor
#1 fix_from_unixtime_0.patch379 byteschx
fix_from_unixtime.patch417 bytesmerlinofchaos

Comments

chx’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new379 bytes

Rerolled, applies, works, needed.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)