title: mysqli_query returns false with error code 0, but query succeeds
body: <p>I have a huge amount of data that is generated from a PHP script and needs to be inserted into a database. I've tried various solutions with different results, but the current solution (and the one I think should be the best) is that i generate the data into a CSV file and then inserts it into the database with the following query:</p>
  <pre><code>LOAD DATA LOCAL INFILE 'myfile.csv' INTO TABLE t1 FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY &quot;'&quot;
  </code></pre>
  <p>I'm using CodeIgniter as the PHP framework, and after the query has executed im redirected to an error page which only says</p>
  <blockquote>
  <p>A Database Error Occurred</p>
  <p>Error Number: 0</p>
  </blockquote>
  <p>There is no error message or anything.</p>
  <p>I've stepped through the code but all I can find is that <code>mysqli_query()</code> returns false and later on <code>mysqli_errno()</code> returns 0 and <code>mysqli_error()</code> returns an empty string.</p>
  <p><strong>However</strong>, the query has actually succeeded and when I look in the database i can see that all the data from the CSV file have successfully been inserted. Is this behaviour to be expected? If so, I guess I have to hack the CodeIgniter code a little, or call <code>mysqli_query()</code> directly instead of going through the framework.</p>
  <p>I've also run the exact same query in MySQL Workbench, and I do not get an error message there.</p>