提交 c3344503 authored 作者: Thomas Mueller's avatar Thomas Mueller

When a domain (user defined data type) contained a user defined function, the…

When a domain (user defined data type) contained a user defined function, the database could not be opened.
上级 f5cce75e
......@@ -111,13 +111,13 @@ public class MetaRecord implements Comparable<MetaRecord> {
return 1;
case DbObject.SCHEMA:
return 2;
case DbObject.USER_DATATYPE:
case DbObject.FUNCTION_ALIAS:
return 3;
case DbObject.SEQUENCE:
case DbObject.USER_DATATYPE:
return 4;
case DbObject.CONSTANT:
case DbObject.SEQUENCE:
return 5;
case DbObject.FUNCTION_ALIAS:
case DbObject.CONSTANT:
return 6;
case DbObject.TABLE_OR_VIEW:
return 7;
......
......@@ -57,6 +57,7 @@ public class TestCases extends TestBase {
if (config.memory) {
return;
}
testCheckContraintWithFunction();
testDeleteAndDropTableWithLobs(true);
testDeleteAndDropTableWithLobs(false);
testEmptyBtreeIndex();
......@@ -84,6 +85,18 @@ public class TestCases extends TestBase {
deleteDb("cases");
}
private void testCheckContraintWithFunction() throws SQLException {
deleteDb("cases");
Connection conn = getConnection("cases");
Statement stat = conn.createStatement();
stat.execute("create alias is_email as 'boolean isEmail(String x) { return x != null && x.indexOf(''@'') > 0; }'");
stat.execute("create domain email as varchar check is_email(value)");
stat.execute("create table test(e email)");
conn.close();
conn = getConnection("cases");
conn.close();
}
private void testOuterJoin() throws SQLException {
deleteDb("cases");
Connection conn = getConnection("cases");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论