db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olav Sandstaa <o...@sun.com>
Subject How to best handle variations in output from ij in sql tests?
Date Mon, 19 Jun 2006 19:52:52 GMT
I am working on reducing the number of tests failing when running with
JDK 1.6. Some of the tests are now failing due to jdk16 specific
master files that have not been updated after introduction of textual
changes. To solve some of these failing tests I try eliminate the need
for jdk16 specific master files.

To avoid creating to more sed rules for filtering some of the
differences I wonder if some of the changes better had been fixed by
making sure that the output is more consistent between client and
embedded driver and between JDK 1.5 and JDK 1.6.

I would like to get feedback on whether the following example should
best be solved by fixing the difference between the output from ij or
by continue to have multiple master files. This example is from the
ieptests.sql which now fails with JDK 1.6 with the client driver:


SQL that makes the test fail:
=============================

ij> call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('inventory', 'ORDERTABLE' , 
'extinout/order.dat', null, null, null) ;


Java 1.5 Embedded output:
=========================

ERROR 38000: The exception 'SQL Exception: Schema 'inventory' does not 
exist' was thrown while evaluating an expression.
ERROR 42Y07: Schema 'inventory' does not exist


Java 1.6 Embedded output:
=========================

ERROR 38000: The exception 'java.sql.SQLSyntaxErrorException: Schema 
'inventory' does not exist' was thrown while evaluating an expression.
ERROR 42Y07: Schema 'inventory' does not exist


Java 1.5 Client output:
=======================

ERROR 38000: The exception 'SQL Exception: Schema 'inventory' does not 
exist' was thrown while evaluating an expression. SQLSTATE: 42Y07: 
Schema 'inventory' does not exist


Java 1.6 Client output:
=======================

ERROR 38000: The exception 'java.sql.SQLSyntaxErrorException: Schema 
'inventory' does not exist' was thrown while evaluating an expression.


The main difference is:

 -embedded: with JDK 1.5 the output writes "SQL Exception" while on
  JDK 1.6 it is "java.sql.SQLSyntaxErrorException" (more exact, but
  less read-friendly?). This difference is handled by seding the
  output.

 -client: with JDK 1.5 the SQL state is included in the output, while
  with JDK 1.6 the SQL state is not included. Is this a bug?

 -embedded vs server: embedded writes the output split over two lines,
  while the client has everything on one line. Could this be changed?

In addition to the detailed question about the specific output making
this test fail, I wonder if we should have some general rules that we
should attempt the output (error/warnings/responses) from ij be as
similar as possible for (a) between client and server and (b) between
different versions of the JVM?

Any feedback is appreciated!

Thanks,
Olav

Mime
View raw message