Mysql 5 & db_rewrite_sql issue - patch works for node privacy by role

starbow - February 14, 2006 - 22:54
Project:Image
Version:4.6.x-1.x-dev
Component:image.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Mysql 5.0.12 and up has changed the join semantics slightly. This patch fixes a place where the use of db_rewrite_sql could potentially generate the error: "Unknown column 'n.nid' in 'on clause'", when the node_privacy_byrole module (or a different access control module) is active.

For more info see: http://drupal.org/node/43735#comment-92865

AttachmentSize
image.module_13.patch825 bytes

#1

chook - March 28, 2006 - 22:46
Title:Mysql 5 & db_rewrite_sql issue» Doesn't work for me...

I'm using simple access and I've been waiting for a patch to come along for this, but when I log out here is what i see.

Fatal error: Unknown column 'n.nid' in 'on clause' query: SELECT DISTINCT(n.nid), n.title, n.body, f.* FROM files f INNER JOIN node_access na ON na.nid = n.nid , node n WHERE (na.grant_view = 1 AND CONCAT(na.realm, na.gid) IN ('all0','simple_access0')) AND f.nid = n.nid AND f.fid = 7 in /home/.haywire/gourd/masha.barashek.org/includes/database.mysql.inc on line 66

#2

chook - March 28, 2006 - 22:53
Title:Doesn't work for me... » Mysql 5 & db_rewrite_sql issue - patch works for node privacy by role

Sorry if I'm putting this into the wrong place.

I just tried it out with the node_privacy_by_role module and it seems to work fine.

#3

starbow - April 1, 2006 - 16:31

This patch only fixes the problem in respect to the image.module. The logout issue is another manifestation of the same underlying problem, but this patch will not fix it.
I think it's been fixed at the source for 4.7, but still crops up all over the place in 4.6.

#4

drewish - July 1, 2007 - 23:46
Status:needs review» closed

This version is no longer supported. If this issue is occurring with a more recent version please open a new issue.

 
 

Drupal is a registered trademark of Dries Buytaert.