title: MySQL VIEW Incorrect key file for table try to repair it
body: <p>I have a <code>FooBar</code> view like:</p>
  <pre><code>CREATE VIEW `FooBar` AS 
  SELECT * FROM `Foo`.`Bar`
  UNION ALL 
  SELECT * FROM `Foo1`.`Bar`
  </code></pre>
  <p>When I <code>SELECT * FROM FooBar</code> I get:</p>
  <blockquote>
  <p>Incorrect key file for table '/tmp/#sql_1234_5.MYI'; try to repair it</p>
  </blockquote>
  <p>When I run the select statements like this:</p>
  <pre><code>SELECT * FROM `Foo`.`Bar`
  UNION ALL 
  SELECT * FROM `Foo1`.`Bar`
  </code></pre>
  <p>Everything goes well. The problem is clearly with my FooBar view.</p>
  <p>When I <code>REPAIR TABLE FooBar</code> I get</p>
  <blockquote>
  <p>'WhiskerDatabase.VisualDiscrimSuperimposed_Results' is not BASE TABLE</p>
  <p>Corrupt</p>
  </blockquote>
  <p>I tried to <code>DROP VIEW FooBar</code>and re<code>CREATE VIEW FooBar</code>... but the problems persists.</p>
  <p>And I can't locate the sql_1234_5.MYI file in <code>/var/lib/mysql/MyDB/</code>.</p>