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

Fix typos

上级 13fa6bbe
...@@ -285,8 +285,8 @@ public class AlterTableAlterColumn extends SchemaCommand { ...@@ -285,8 +285,8 @@ public class AlterTableAlterColumn extends SchemaCommand {
if (type == CommandInterface.ALTER_TABLE_DROP_COLUMN) { if (type == CommandInterface.ALTER_TABLE_DROP_COLUMN) {
for (Column removeCol : columnsToRemove) { for (Column removeCol : columnsToRemove) {
Column foundCol = null; Column foundCol = null;
for (Iterator<Column> iter = newColumns.iterator(); iter.hasNext(); ) { for (Iterator<Column> it = newColumns.iterator(); it.hasNext();) {
Column newCol = iter.next(); Column newCol = it.next();
if (newCol.getName() == removeCol.getName()) { if (newCol.getName() == removeCol.getName()) {
foundCol = newCol; foundCol = newCol;
break; break;
......
...@@ -535,15 +535,15 @@ public abstract class Table extends SchemaObjectBase { ...@@ -535,15 +535,15 @@ public abstract class Table extends SchemaObjectBase {
* references and indexes are dropped. * references and indexes are dropped.
* *
* @param session the session * @param session the session
* @param columsToDrop the columns to drop * @param columnsToDrop the columns to drop
* @throws DbException if the column is referenced by multi-column * @throws DbException if the column is referenced by multi-column
* constraints or indexes * constraints or indexes
*/ */
public void dropMultipleColumnsConstraintsAndIndexes(Session session, public void dropMultipleColumnsConstraintsAndIndexes(Session session,
ArrayList<Column> columsToDrop) { ArrayList<Column> columnsToDrop) {
HashSet<Constraint> constraintsToDrop = New.hashSet(); HashSet<Constraint> constraintsToDrop = New.hashSet();
if (constraints != null) { if (constraints != null) {
for (Column col : columsToDrop) { for (Column col : columnsToDrop) {
for (int i = 0, size = constraints.size(); i < size; i++) { for (int i = 0, size = constraints.size(); i < size; i++) {
Constraint constraint = constraints.get(i); Constraint constraint = constraints.get(i);
HashSet<Column> columns = constraint.getReferencedColumns(this); HashSet<Column> columns = constraint.getReferencedColumns(this);
...@@ -562,7 +562,7 @@ public abstract class Table extends SchemaObjectBase { ...@@ -562,7 +562,7 @@ public abstract class Table extends SchemaObjectBase {
HashSet<Index> indexesToDrop = New.hashSet(); HashSet<Index> indexesToDrop = New.hashSet();
ArrayList<Index> indexes = getIndexes(); ArrayList<Index> indexes = getIndexes();
if (indexes != null) { if (indexes != null) {
for (Column col : columsToDrop) { for (Column col : columnsToDrop) {
for (int i = 0, size = indexes.size(); i < size; i++) { for (int i = 0, size = indexes.size(); i < size; i++) {
Index index = indexes.get(i); Index index = indexes.get(i);
if (index.getCreateSQL() == null) { if (index.getCreateSQL() == null) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论