Hi Thomas,
Recently I upgraded H2 from the very old version 2008-12-19 to the
version 2010-10-04. I noticed that in one particular case of invalid
SQL statement the text of SQL was not included as part of the
exception.
Here is the test case:
@Test
public void memory() throws Exception {
Connection connection;
Class.forName("org.h2.Driver");
connection = DriverManager.getConnection("jdbc:h2:mem:");
Statement statement = connection.createStatement();
statement.execute("CREATE TABLE ONE(A int, B int)");
statement.execute("INSERT INTO ONE VALUES (10, 20)");
statement.execute("INSERT INTO ONE VALUES (10, 30)");
try {
ResultSet rs = statement.executeQuery("SELECT B, A FROM
ONE GROUP BY A");
rs.next();
} catch (SQLException e) {
e.printStackTrace(); // SQL statement is not shown here
}
}
Sincerely
Pavel
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.