I've moved our multisite installed 4.6.4 sites over to a new server and upgraded to 4.6.5.
I am getting a lot of these errors:
Column 'nid' in from clause is ambiguous query: SELECT DISTINCT(n.nid), n.title, n.type, n.status, n.moderate, e.event_start FROM node n INNER JOIN node_access na ON na.nid = n.nid INNER JOIN event e USING (nid) WHERE (na.grant_view = 1 AND CONCAT(na.realm, na.gid) IN ('all0','node_privacy_byrole_role1','node_privacy_byrole_user0')) AND n.status = 1 AND n.moderate = 0 AND e.event_start >= 1138925260 ORDER BY event_start LIMIT 0, 6 in
/path/to/my/includes/database.mysql.inc
Here's another one:
Unknown column 'n.nid' in 'on clause' query: SELECT t.tid, COUNT(DISTINCT(n.nid)) AS c FROM term_node t INNER JOIN node_access na ON na.nid = n.nid INNER JOIN node n ON t.nid = n.nid WHERE (na.grant_view = 1 AND CONCAT(na.realm, na.gid) IN ('all0','node_privacy_byrole_role1','node_privacy_byrole_user0')) AND n.status = 1 GROUP BY t.tid in /path/to/my/includes/database.mysql.inc
Out of 6 installations of Drupal that got moved there is only one site that is having problems. Initially I thought that I forgot to import part of the database. Then I imported the database in little sections and made sure there were no errors. This didn't help at all.
From what I've gathered so far a non-core module is creating these errors. I went and turned off all non-core modules and watched the error log as I enabled one at a time. This method seemed to be working, but there is a problem with it; the errors are usually a long time apart where one or two will occur and then nothing happens for a 1/2 an hour or so. I would suspect it relates to visitors on the site.