提交 b71c93ff authored 作者: Thomas Mueller Graf's avatar Thomas Mueller Graf

Fix IBM DB2 compatibility

上级 e66811e5
...@@ -664,6 +664,7 @@ public class Parser { ...@@ -664,6 +664,7 @@ public class Parser {
} else if (database.getMode().sysDummy1 && } else if (database.getMode().sysDummy1 &&
"SYSIBM".equals(schemaName)) { "SYSIBM".equals(schemaName)) {
// IBM DB2 and Apache Derby compatibility: SYSIBM.SYSDUMMY1 // IBM DB2 and Apache Derby compatibility: SYSIBM.SYSDUMMY1
schema = database.getSchema(session.getCurrentSchemaName());
} }
} }
return schema; return schema;
...@@ -4902,17 +4903,15 @@ public class Parser { ...@@ -4902,17 +4903,15 @@ public class Parser {
if (schema == null) { if (schema == null) {
if (ifExists) { if (ifExists) {
return new NoOperation(session); return new NoOperation(session);
} else { }
throw DbException.get(ErrorCode.SCHEMA_NOT_FOUND_1, schemaName); throw DbException.get(ErrorCode.SCHEMA_NOT_FOUND_1, schemaName);
} }
} else {
AlterSchemaRename command = new AlterSchemaRename(session); AlterSchemaRename command = new AlterSchemaRename(session);
command.setOldSchema(schema); command.setOldSchema(schema);
checkSchema(old); checkSchema(old);
command.setNewName(newName); command.setNewName(newName);
return command; return command;
} }
}
private AlterSequence parseAlterSequence() { private AlterSequence parseAlterSequence() {
boolean ifExists = readIfExists(false); boolean ifExists = readIfExists(false);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论