import java.sql.SQLException;
import java.sql.PreparedStatement;
import java.sql.ResultSet;


public class Bug12104 extends testsuite.BaseTestCase
{
   public Bug12104(String name)
   {
      super(name);
   }

   public void setUp() throws Exception
   {
      super.setUp();
      dropTable("series_geom");
      createTable("series_geom","(id int(11) NOT NULL, geom GEOMETRY NOT NULL,   SPATIAL INDEX(geom),  primary key (id)) type=MyISAM");
      stmt.executeUpdate("insert into series_geom values (1, geomFromText('Point(0 0)', 10))");
   }


   public void testMetadataBug12029() throws SQLException
   {
    
     PreparedStatement pstmt = conn.prepareStatement("select id, geom from series_geom where id > 0");
   // Exception thrown here:    
     ResultSet rs = pstmt.executeQuery();
     assertTrue("must return a row",rs.next()) ;
   }

   public static void  main(String args[]) throws Exception
   {
      junit.textui.TestRunner.run(Bug12104.class);      
   }

}


