title: MySQL select into outfile "file already exists" and "file does not exist" duality (?) case
body: <p>I ran this command successfully on my CentOS machine's MariaDB:</p>
  
  <pre><code>MariaDB&gt; select * from foobar into outfile '/tmp/schrodinger_cat.csv'
  fields terminated by ',' enclosed by '"' lines terminated by '\n';
  
  Query OK, 900 rows affected (0.06 sec)
  </code></pre>
  
  <h2>Cat is alive? No.</h2>
  
  <p>You'd expect to find '/tmp/schrodinger_cat.csv'. Me too. I <code>ls</code> it:</p>
  
  <pre><code># ls /tmp/schrodinger_cat.csv
  
  ls: cannot access /tmp/schrodinger_cat.csv: No such file or directory
  </code></pre>
  
  <h2>Cat is dead? No.</h2>
  
  <p>What? So I went back to the MariaDB command line client and run the same SQL again:</p>
  
  <pre><code>MariaDB&gt; select * from foobar into outfile '/tmp/schrodinger_cat.csv'
  fields terminated by ',' enclosed by '"' lines terminated by '\n';
  
  ERROR 1086 (HY000): File '/tmp/schrodinger_cat.csv' already exists
  </code></pre>
  
  <h2>Cat is alive exclusively for MariaDB? No.</h2>
  
  <p>I thought maybe the MariaDB is accessing another file system? So I tried this:</p>
  
  <pre><code>MariaDB&gt; \! ls /tmp/schrodinger_cat.csv;
  
  ls: cannot access /tmp/schrodinger_cat.csv: No such file or directory
  </code></pre>
  
  <p>So, no.</p>
  
  <p>Any idea what happened? How do I get the file '/tmp/schrodinger_cat.csv'?</p>