title: MySQL Internal Error Ignored
body: <p>I am receiving the following error:</p>
  
  <pre><code>Exception mysql.connector.errors.InternalError: InternalError() in &lt;generator object sql_iter at 0x10efe84b0&gt; ignored
  </code></pre>
  
  <p>When I try to iterate through:</p>
  
  <pre><code>select *
  from cftut.instances as instances
  join cftut.templates as templates on
      templates.subtemplate_id = instances.subtemplate_id
  join cftut.users as users on
      users.user_id = instances.user_id
  where start &gt;= "2013-08-08 00:00:00" and start &lt; "2013-08-15 00:00:00"
  order by instances.user_id, instances.start, instances.subinstance_id
  </code></pre>
  
  <p>The generator error referred to by the objects is defined here:</p>
  
  <pre><code>def sql_iter(*statements):
      connection = get_global_connection()
      for statement in statements:
          try:
              cursor = connection.cursor()
              cursor.execute(statement)
              for row in cursor:
                  yield row
          finally:
              cursor.close()
  </code></pre>
  
  <p>Finally, this is called by the following code</p>
  
  <pre><code>for i, instance in enumerate(sql_iter(
      sql_listed_above
  )):
      if i%500==0:
          print '-----', i
      yield changes
  </code></pre>
  
  <p>What could be causing this and why is it saying that it is ignored when it actually stops the program running?</p>