提交 d40ab416 authored 作者: plus33's avatar plus33

* Check only for closing bracket if opening bracket was detected

上级 6278e9f6
...@@ -6073,7 +6073,7 @@ public class Parser { ...@@ -6073,7 +6073,7 @@ public class Parser {
command.setType(CommandInterface.ALTER_TABLE_DROP_COLUMN); command.setType(CommandInterface.ALTER_TABLE_DROP_COLUMN);
ArrayList<Column> columnsToRemove = New.arrayList(); ArrayList<Column> columnsToRemove = New.arrayList();
Table table = tableIfTableExists(schema, tableName, ifTableExists); Table table = tableIfTableExists(schema, tableName, ifTableExists);
readIf("("); // For Oracle compatibility - open bracket required boolean openingBracketDetected = readIf("("); // For Oracle compatibility - open bracket required
do { do {
String columnName = readColumnIdentifier(); String columnName = readColumnIdentifier();
if (table == null) { if (table == null) {
...@@ -6085,7 +6085,9 @@ public class Parser { ...@@ -6085,7 +6085,9 @@ public class Parser {
Column column = table.getColumn(columnName); Column column = table.getColumn(columnName);
columnsToRemove.add(column); columnsToRemove.add(column);
} while (readIf(",")); } while (readIf(","));
readIf(")"); // For Oracle compatibility - close bracket if (openingBracketDetected) {
read(")"); // For Oracle compatibility - close bracket
}
command.setTableName(tableName); command.setTableName(tableName);
command.setIfTableExists(ifTableExists); command.setIfTableExists(ifTableExists);
command.setColumnsToRemove(columnsToRemove); command.setColumnsToRemove(columnsToRemove);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论