Details
Description
In the 1.4er Version it give a SQLDataException when calling ResultSet.first() to a executeQuery if the database (excepted the table) has no entries.
The description in the javadocs says:
Moves the cursor to the first row in this ResultSet object.
Returns:true if the cursor is on a valid row; false if there are no rows in the result set
in 1.4.0 beta 1 it returns also true, if no entry available.
java.sql.SQLDataException: Current position is before the first row
at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:115)
at org.mariadb.jdbc.internal.util.ExceptionMapper.throwException(ExceptionMapper.java:69)
at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.throwError(MariaSelectResultSet.java:467)
at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.getValueObject(MariaSelectResultSet.java:454)
at org.mariadb.jdbc.internall.queryresults.resultset.AbstractSelectResultSet.getLong(AbstractSelectResultSet.java:306)
at org.mariadb.jdbc.internal.queryresults.resultset.AbstractSelectResultSet.getLong(AbstractSelectResulttSet.java:302)