title: mysql_fetch_array returning false when pointer is at exactly 1/2 of mysql_num_rows
body: <p>The table is about 1.2M rows (its actively going up, so total rows grows slightly between iterations of this test, but that doesn't change the outcome).</p>
  
  <p><strong>mysql_num_rows</strong> is displayed - which is accurate, tested with select count(*) - after the pull query in order to show how large the result set is.</p>
  
  <p>Then, a loop assigns the row to an array with <strong>mysql_fetch_array()</strong>.  Iteration counter is incremented for every round, and you would expect it go get to <strong>mysql_num_rows</strong> and then break out of the while loop.  Pretty standard stuff, been done a million times over.</p>
  
  <p>What actually happens, on the other hand, is quite odd.  It gets to exactly 1/2 way (floor(number_of_rows/2)) and then <strong>mysql_fetch_array()</strong> returns false.  No matter how you limit the result set...</p>
  
  <pre><code>$iteration = 0;
  $result = mysql_query("select `file_id`, `size` from `files`", $dbconn); // get all records
  echo "\nDone. Found " . mysql_num_rows($result) . " rows."; // Done. Found 1291595 rows.
  if ($result){
      while ($line = mysql_fetch_array($result) !== false){
           $iteration++;
      }
      echo "\ngot to $iteration before mysql_fetch_array was false."; // got to 642679 before mysql_fetch_array was false.
  }
  </code></pre>
  
  <p>Sometimes $line is an empty array, sometimes mysql_fetch_array triggers false. </p>
  
  <p>It gets mysql_num_rows that i'd expect and continues for 1/2 the records of the total result set size, then it stops...</p>
  
  <p>If I put now, limit = 967356,1000000, I get:</p>
  
  <pre><code>Done. Found 324963 rows.
  got to 162482 before mysql_fetch_array was false.
  </code></pre>
  
  <p>This is 1 off from being exactly 1/2 way.</p>
  
  <p>limit = 1000000, 1000000:</p>
  
  <pre><code>Done. Found 292606 rows.
  got to 146303 before mysql_fetch_array was false.
  </code></pre>
  
  <p>What in the world could this be?</p>
  
  <p>php info:</p>
  
  <p>php -v
  PHP 5.4.19-1+debphp.org~precise+3 (cli) (built: Aug 27 2013 14:29:42)
  Copyright (c) 1997-2013 The PHP Group</p>