title: ResultSetImpl throws NullPointerException
body: <p>i'm running mysql 5.5 with mysql 5.1.18 connector.
  a simple query of style</p>
  
  <p><code>select * from my_table where column_a in ('aaa','bbb',...) and column b=1;</code> </p>
  
  <p>is executed from within java application. the query returns a resultset of 25k rows, 8 columns in each. while reading the results in while loop </p>
  
  <pre><code>while(rs.next())
  {
      MyObject c= new MyObject();  
      c.setA(rs.getString("A"));
      c.setB(rs.getString("B"));
      c.setC(rs.getString("C"));
      ...
  }
  </code></pre>
  
  <p>a following exception is thrown, usually during the first loops, but never in the same row:</p>
  
  <pre><code>java.lang.NullPointerException
      at com.mysql.jdbc.ResultSetImpl.getStringInternal(ResultSetImpl.java:5720)
      at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5570)
      at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5610)
  </code></pre>
  
  <p>i took a look at the source code in ResultSetImpl.java:5720 and i see the following: </p>
  
  <pre><code>switch (metadata.getSQLType())
  </code></pre>
  
  <p>where metadata is</p>
  
  <pre><code>Field metadata = this.fields[internalColumnIndex];
  </code></pre>
  
  <p>and getSQLType is a logic-less getter returning an int. what's interesting, is that the same metadata object is called numerous times several lines above with other getters, and throws no exceptions.</p>
  
  <p>btw, there is no problem with the query above while ran directly within mysql.
  application runs in aws.</p>
  
  <p>any ideas how to solve this? 
  thanks.</p>