Created a unit-test for this (attached), but I don't know where to fix it. Thomas?

On 2012-02-01 14:44, n-man wrote:
DatabaseMetaData metaData = c.getMetaData();
         ResultSet cols = metaData.getColumns(null, null, null, null)

--
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.

Index: src/test/org/h2/test/jdbc/TestMetaData.java
===================================================================
--- src/test/org/h2/test/jdbc/TestMetaData.java (revision 4078)
+++ src/test/org/h2/test/jdbc/TestMetaData.java (working copy)
@@ -52,7 +52,8 @@
         testCrossReferences();
         testProcedureColumns();
         testUDTs();
-
+        testAllowLiteralsNone();
+        
         stat = conn.createStatement();
         meta = conn.getMetaData();
         testStatic();
@@ -894,4 +895,13 @@
 
     }
 
+    /** there was a bug in our metadata implementation when 
AllowLiterals==NONE */
+    private void testAllowLiteralsNone() throws SQLException {
+        conn = getConnection("metaData");
+        stat = conn.createStatement();
+        stat.execute("SET ALLOW_LITERALS NONE");
+        DatabaseMetaData metaData = conn.getMetaData();
+        metaData.getColumns(null, null, null, null);
+        conn.close();
+    }
 }

Reply via email to