Subject | Re: [Firebird-Java] Re: JDBC Bug |
---|---|
Author | Blas Rodriguez Somoza |
Post date | 2002-04-26T18:55:46Z |
Hello
It is not very usual but this test is part of the Sun JDBC Test Suite.
I'm testing the driver against the TestSuite. I know it is not the first think but is a way to test the driver, and helps me to find
another problems that I will report as soon as I analize it.
Ignoring the not yet implemented exceptions, there are the following bugs according to the test, some of it trivial to solve.
- Connection
createStatement(resultSetType,resultSetConcurrency) must return a Statement with the closest possible resultSetType and
Concurrency, not null, or exception. To check which is the Type and Concurrency returned in a ResultSet the methods
ResultSet.getType and getConcurrency can be used.
- DatabaseMetaData
getCatalogs must return empty ResultSet if catalogs are not supported.
getSchemas must return empty ResultSet if schemas are not supported.
- ResultSetMetaData
getCatalogName must return empty String if catalogs are not supported.
getSchemaName must return empty String if schemas are not supported.
- Statement
It seems that Statement.close() don't work. ExecuteQuery() must throw SQLException if called after a Statement.close() for the
same Statement, but it executes without throwing any exception.
getResult must return empty resultSet if the Statement don't return a ResultSet (the bug this mail is about).
getUpdateCount must return -1 if the last Statement was a select Statement, but it returns 0.
SQLException.getSQLState() must return a String after a Statement.executeQuery with an errorneous query throws it.
- PreparedStatement
It seems that clearParameters does not work or there is some problem in executeQuery, executeQuery does not throw and exception
when executed after a clearParameters, and it must throw it if the parameters was not set.
This relation don't include get/set or escape tests.
Regards
Blas Rodriguez Somoza.
It is not very usual but this test is part of the Sun JDBC Test Suite.
I'm testing the driver against the TestSuite. I know it is not the first think but is a way to test the driver, and helps me to find
another problems that I will report as soon as I analize it.
Ignoring the not yet implemented exceptions, there are the following bugs according to the test, some of it trivial to solve.
- Connection
createStatement(resultSetType,resultSetConcurrency) must return a Statement with the closest possible resultSetType and
Concurrency, not null, or exception. To check which is the Type and Concurrency returned in a ResultSet the methods
ResultSet.getType and getConcurrency can be used.
- DatabaseMetaData
getCatalogs must return empty ResultSet if catalogs are not supported.
getSchemas must return empty ResultSet if schemas are not supported.
- ResultSetMetaData
getCatalogName must return empty String if catalogs are not supported.
getSchemaName must return empty String if schemas are not supported.
- Statement
It seems that Statement.close() don't work. ExecuteQuery() must throw SQLException if called after a Statement.close() for the
same Statement, but it executes without throwing any exception.
getResult must return empty resultSet if the Statement don't return a ResultSet (the bug this mail is about).
getUpdateCount must return -1 if the last Statement was a select Statement, but it returns 0.
SQLException.getSQLState() must return a String after a Statement.executeQuery with an errorneous query throws it.
- PreparedStatement
It seems that clearParameters does not work or there is some problem in executeQuery, executeQuery does not throw and exception
when executed after a clearParameters, and it must throw it if the parameters was not set.
This relation don't include get/set or escape tests.
Regards
Blas Rodriguez Somoza.
----- Original Message -----
From: "rrokytskyy" <rrokytskyy@...>
To: <Firebird-Java@yahoogroups.com>
Sent: Friday, April 26, 2002 6:10 PM
Subject: [Firebird-Java] Re: JDBC Bug
> Usually people use stmt.executeUpdate(...), not stmt.execute(...),
> but I will check this issue.
>
> Thanks a lot!
>
> Roman Rokytskyy
>
> --- In Firebird-Java@y..., "Blas Rodriguez Somoza" <blas@p...> wrote:
> > Hello
> >
> > I have found the following bug in the driver
> >
> > When executing the code
> >
> > stmt=conn.createStatement();
> > stmt.execute("update CTSTABLE2 set PRICE=PRICE*20 where
> TYPE_ID=1");
> > java.sql.ResultSet retResSet=stmt.getResultSet();
> > stmt.close();
> >
> > the getResultSet method throws
> >
> > java.lang.Error: registerStatement called with no transaction
> > at
> > org.firebirdsql.jca.FBManagedConnection.registerStatement
> (FBManagedConnectio
> > n.java:633)
> > at
> > org.firebirdsql.jdbc.FBResultSet$FBStatementFetcher.<init>
> (FBResultSet.java:
> > 2519)
> > at org.firebirdsql.jdbc.FBResultSet.<init>(FBResultSet.java:104)
> > at org.firebirdsql.jdbc.FBStatement.getResultSet
> (FBStatement.java:526)
> >
> > When, according to the specifications it must return a empty
> ResultSet.
> >
> > Regards
> > Blas Rodriguez Somoza
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>