提交 68dbdcd5 authored 作者: Thomas Mueller's avatar Thomas Mueller

Some DatabaseMetaData methods didn't work when using ALLOW_LITERALS NONE.

上级 024e80c3
...@@ -18,7 +18,8 @@ Change Log ...@@ -18,7 +18,8 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Trying to convert a VARCHAR to UUID will now fail if the text contains <ul><li>Some DatabaseMetaData methods didn't work when using ALLOW_LITERALS NONE.
</li><li>Trying to convert a VARCHAR to UUID will now fail if the text contains
a character that is not a hex digit, '-', or not a whitespace. a character that is not a hex digit, '-', or not a whitespace.
</li><li>TriggerAdapter: in "before" triggers, values can be changed using the ResultSet.updateX methods. </li><li>TriggerAdapter: in "before" triggers, values can be changed using the ResultSet.updateX methods.
</li><li>Creating a table with column data type NULL now works (even if not very useful). </li><li>Creating a table with column data type NULL now works (even if not very useful).
......
...@@ -207,6 +207,8 @@ public class TestMetaData extends TestBase { ...@@ -207,6 +207,8 @@ public class TestMetaData extends TestBase {
// meta.getSuperTypes() // meta.getSuperTypes()
// meta.getTypeInfo() // meta.getTypeInfo()
testAllowLiteralsNone();
conn.close(); conn.close();
deleteDb("metaData"); deleteDb("metaData");
...@@ -894,4 +896,37 @@ public class TestMetaData extends TestBase { ...@@ -894,4 +896,37 @@ public class TestMetaData extends TestBase {
} }
private void testAllowLiteralsNone() throws SQLException {
Connection conn = getConnection("metaData");
Statement stat = conn.createStatement();
stat.execute("SET ALLOW_LITERALS NONE");
DatabaseMetaData meta = conn.getMetaData();
// meta.getAttributes(null, null, null, null);
meta.getBestRowIdentifier(null, null, null, 0, false);
meta.getCatalogs();
// meta.getClientInfoProperties();
meta.getColumnPrivileges(null, null, null, null);
meta.getColumns(null, null, null, null);
meta.getCrossReference(null, null, null, null, null, null);
meta.getExportedKeys(null, null, null);
// meta.getFunctionColumns(null, null, null, null);
// meta.getFunctions(null, null, null);
meta.getImportedKeys(null, null, null);
meta.getIndexInfo(null, null, null, false, false);
meta.getPrimaryKeys(null, null, null);
meta.getProcedureColumns(null, null, null, null);
meta.getProcedures(null, null, null);
meta.getSchemas();
// meta.getSchemas(null, null);
meta.getSuperTables(null, null, null);
// meta.getSuperTypes(null, null, null);
meta.getTablePrivileges(null, null, null);
meta.getTables(null, null, null, null);
meta.getTableTypes();
meta.getTypeInfo();
meta.getUDTs(null, null, null, null);
meta.getVersionColumns(null, null, null);
conn.close();
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论