Mercurial > hg > monetdb-java
diff tests/JDBC_API_Tester.java @ 844:9ad9c8c38fe4
The String types[] passed to getTables() may contain entries containing null or empty string "". Those are invalid table types.
Filter them out of the constructed SQL IN-list.
Also added a test with bad table types[] to test the new optimization.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 04 Jan 2024 19:28:31 +0100 (16 months ago) |
parents | e890195256ac |
children | d7ffef8faf38 |
line wrap: on
line diff
--- a/tests/JDBC_API_Tester.java +++ b/tests/JDBC_API_Tester.java @@ -1168,6 +1168,12 @@ final public class JDBC_API_Tester { "char(1) varchar(1024) varchar(1024) varchar(25) varchar(1048576) char(1) char(1) char(1) char(1) char(1)\n" + "null tmp tlargechar LOCAL TEMPORARY TABLE null null null null null null\n"); + String badtabletypes[] = {null, "", null, ""}; + compareResultSet(dbmd.getTables(null, "tmp", "tlargechar", badtabletypes), "getTables(null, tmp, tlargechar, badtabletypes)", + "Resultset with 10 columns\n" + + "TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS TYPE_CAT TYPE_SCHEM TYPE_NAME SELF_REFERENCING_COL_NAME REF_GENERATION\n" + + "char(1) varchar(1024) varchar(1024) varchar(25) varchar(1048576) char(1) char(1) char(1) char(1) char(1)\n"); + compareResultSet(dbmd.getTables(null, "jdbctst", "schemas", null), "getTables(null, jdbctst, schemas, null)", "Resultset with 10 columns\n" + "TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS TYPE_CAT TYPE_SCHEM TYPE_NAME SELF_REFERENCING_COL_NAME REF_GENERATION\n" +