Hi,
I am running 4.5.1 and upgraded to the CVS version of taxomony_access complete with patches to taxonomy.module.
After some initial problems which were related to not cleaning out the tables node_access and term_access all seems to be functioning correctly, however everytime there is a change to the category permissions I get the following single entry in the log:
user error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT nid from term_node)' at line 1 query: SELECT nid FROM node WHERE nid not IN (SELECT nid from term_node) in /home/james/public_html/drupal/includes/database.mysql.inc on line 125.
Assuming a version missmatch issue I upgraded database.inc and database.mysql.inc to cvs however this turned out to be unworkable so I reverted. As stated, everything appears to be fine except for the offending log entry.
Comments
Comment #1
pyromanfo commentedWhat version of Mysql are you running? I'm running 4.1.7 and I'm not getting any errors
Comment #2
javanaut commentedMysql 4.0.x and greater support subselects, which appear to be in use here. Mysql 3.23.x doesn't support that. You can restructure your SQL query to use the LEFT JOIN syntax to be more compatible.
Just guessing, I would say changing this:
to something like this:
Comment #3
pyromanfo commentedOkay, it's in CVS. Thanks.
Comment #4
jnt commentedYes, the fix has worked, no more log entries appear to be occuring. Thanks all.
For the record on problem scope however, the version of MySQL I am running on which the error was occuring was/is 4.0.22.
Perhaps there is an MySQL flag set?
Anyway, thanks again to both of you.
Comment #5
javanaut commentedActually referring to the website, it appears that I was wrong. Version 4.1 and greater support subselects, not versions 4.0.x.
http://dev.mysql.com/doc/mysql/en/Subqueries.html
Additionally, the NOT IN syntax generally requires a full table scan, as all records have to be explicitely checked. Though the syntax is lovely, the performance suffers. If there is a way around it, I would avoid it.
Comment #6
Steve Dondley commentedHas this been fixed for 4.5.1? I'm getting errors on 4.5.1.
Comment #7
Steve Dondley commentedNever mind. I see it has been fixed on 4.5.1
Comment #8
(not verified) commented