title: Got error 28 from storage engine while running large UNION query
body: <p>I am running into error <code>Error Code: 1030. Got error 28 from storage engine</code> when running the following large <code>UNION</code> query ,when I run the queries which I am UNION'ing seperately they run fine..looking at other <a href="https://stackoverflow.com/questions/10631387/1030-got-error-28-from-storage-engine">1030 Got error 28 from storage engine</a> posts the issue seems to be with <code>Database Server because it is out of disk space</code> or <code>/tmp</code> folder is out of space..my question is why only on the large <code>UNION</code> query?</p>
  
  <pre><code>   select distinct cl.change_list_id, cl.change_list, cr.change_request, compL.component_id ,
       compL.component_label_id, compL.component_label, intS.integration_status, lr.ec_job_link, 
      lr.submitted_by, lr.submission_time, lr.completion_time, lr.lookahead_run_status 
      from change_lists as cl, component_labels_change_lists as clcl, component_labels as compL, 
      component_label_details as cld, integration_status as intS, change_lists_change_requests as clcr, 
      change_requests as cr, lookahead_run_change_list as lrcl, lookahead_run as lr where cl.change_list 
      in ( 2033001 ) and clcl.change_list_id = cl.change_list_id and 
      clcl.component_label_id = compL.component_label_id and cld.component_label_id = compL.component_label_id 
      and intS.integration_status_id = cld.integration_status_id and clcr.change_list_id = cl.change_list_id 
      and cr.change_request_id = clcr.change_request_id and lrcl.change_list_id=cl.change_list_id 
      and lrcl.lookahead_run_id=lr.lookahead_run_id and lr.lookahead_run_status='complete' 
  
  
      UNION 
  
  select distinct cl.change_list_id, cl.change_list, cr.change_request, compL.component_id , 
      compL.component_label_id, compL.component_label, intS.integration_status, lr.ec_job_link, 
      lr.submitted_by, lr.submission_time, lr.completion_time, lr.lookahead_run_status from change_lists as cl, 
      component_labels_change_lists as clcl, component_labels as compL, component_label_details as cld, 
      integration_status as intS, change_lists_change_requests as clcr, change_requests as cr, 
      lookahead_run_change_list as lrcl, lookahead_run as lr where cr.change_request in ( 2033001 ) and 
      clcr.change_request_id = cr.change_request_id and cl.change_list_id = clcr.change_list_id and 
      clcl.change_list_id = cl.change_list_id and clcl.component_label_id = compL.component_label_id and 
      cld.component_label_id = compL.component_label_id and intS.integration_status_id = cld.integration_status_id 
      and lrcl.change_list_id=cl.change_list_id and lrcl.lookahead_run_id=lr.lookahead_run_id 
      and lr.lookahead_run_status='complete'
  </code></pre>