提交 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,16 +4903,14 @@ public class Parser { ...@@ -4902,16 +4903,14 @@ 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);
} }
} else { throw DbException.get(ErrorCode.SCHEMA_NOT_FOUND_1, schemaName);
AlterSchemaRename command = new AlterSchemaRename(session);
command.setOldSchema(schema);
checkSchema(old);
command.setNewName(newName);
return command;
} }
AlterSchemaRename command = new AlterSchemaRename(session);
command.setOldSchema(schema);
checkSchema(old);
command.setNewName(newName);
return command;
} }
private AlterSequence parseAlterSequence() { private AlterSequence parseAlterSequence() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论