[drupal-devel] [bug] SQL error when node_access is used

tangent drupal-devel at drupal.org
Wed Feb 23 07:03:50 UTC 2005

 Project:      Drupal
 Version:      cvs
 Component:    taxonomy.module
 Category:     bug reports
 Priority:     critical
 Assigned to:  Anonymous
 Reported by:  tangent
 Updated by:   tangent
 Status:       patch
 Attachment:   http://drupal.org/files/issues/nodeaccess.patch (1.21 KB)

I am testing the nodeperm_role.module and I experienced an SQL error
when node permissions are changed.
The problem is that the query in question uses "INNER JOIN {term_node}
USING (tid)" but the db_rewrite_sql() function adds another inner join
in front of this one so the USING clause breaks. My patch changes all
the USING statements to ON to prevent this.
Perhaps the documentation for db_rewrite_sql() should be updated to
warn against the use of the USING clause. I don't see any other
instances of it in core but many contrib modules use it.


View: http://drupal.org/node/17794
Edit: http://drupal.org/project/comments/add/17794

More information about the drupal-devel mailing list