Body: <p>There are a parent Smart Group which contains several "child" Smart Groups. All was working a while, until at some time point it starts throw an error, something like </p>
  
  <pre><code> [debug_info] =&gt; CREATE TEMPORARY TABLE civicrm_temp_group_contact_cache1208
   (SELECT 258 as group_id,  contact_a.id as id  
  FROM civicrm_contact contact_a    
  LEFT JOIN civicrm_group_contact 
  `civicrm_group_contact-  262,278,261,263,264,265,266,267,268,269,270,271,272,273,274,275`
   ON 
  ... long query skipped ...
   WHERE civicrm_group_contact.status = 'Removed'
   AND   civicrm_group_contact.group_id = 258 ) ); 
  [nativecode=1054 ** Unknown column 'civicrm_relationship.is_active' 
  in 'where clause']
  </code></pre>
  
  <p>Is this a bug?  CiviCRM 4.6.15; </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-23T15:16:19.297Z
Comments.Text: Seeing this on a 4.6.16 site, did you find a resolution?
Comments.UserDisplayName: davejenx
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-24T20:15:39.997Z
Comments.Text: Nope; haven't searched though, just realized it might be an issue with SQL queries when smart group child is also a  smart group. Should have reported, but recent security update has broken things badly, so totally forgot about this issue.
Comments.UserDisplayName: yurg
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-06-14T14:02:33.273Z
Comments.Text: Thanks for the response. Do post back here if you create an issue or make any progress. I'll do likewise.
Comments.UserDisplayName: davejenx
Tags: <database><error><relationships><smartgroups><mysql>
Title: Unknown column civicrm_relationship.is_active while child smart group edit (create temporary table fails)
ThreadText: # Unknown column civicrm_relationship.is_active while child smart group edit (create temporary table fails)
  
  (Asked by: username_0 on 2016-04-25)
  
  There are a parent Smart Group which contains several "child" Smart Groups. All was working a while, until at some time point it starts throw an error, something like 
   [debug_info] => CREATE TEMPORARY TABLE civicrm_temp_group_contact_cache1208
   (SELECT 258 as group_id,  contact_a.id as id  
  FROM civicrm_contact contact_a    
  LEFT JOIN civicrm_group_contact 
  `civicrm_group_contact-  262,278,261,263,264,265,266,267,268,269,270,271,272,273,274,275`
   ON 
  ... long query skipped ...
   WHERE civicrm_group_contact.status = 'Removed'
   AND   civicrm_group_contact.group_id = 258 ) ); 
  [nativecode=1054 ** Unknown column 'civicrm_relationship.is_active' 
  in 'where clause']
  
  Is this a bug?  CiviCRM 4.6.15;
  
  **Tags:** database, error, relationships, smartgroups, mysql
  
  > **Comments:**
  > **username_1**: Seeing this on a 4.6.16 site, did you find a resolution?  
  > **username_0**: Nope; haven't searched though, just realized it might be an issue with SQL queries when smart group child is also a  smart group. Should have reported, but recent security update has broken things badly, so totally forgot about this issue.  
  > **username_1**: Thanks for the response. Do post back here if you create an issue or make any progress. I'll do likewise.  
  
  ---
  
  ## 0 answers
  
  