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
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | fix_from_unixtime_0.patch | 379 bytes | chx |
| fix_from_unixtime.patch | 417 bytes | merlinofchaos |
Comments
Comment #1
chx commentedRerolled, applies, works, needed.
Comment #2
dries commentedCommitted to HEAD. Thanks.
Comment #3
(not verified) commented