提交 2cdafd3a authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Use TreeMap in MergeUsing for safety

上级 03f575be
......@@ -6,8 +6,8 @@
package org.h2.command.dml;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.TreeMap;
import org.h2.api.ErrorCode;
import org.h2.api.Trigger;
......@@ -278,7 +278,7 @@ public class MergeUsing extends Prepared {
private String queryAlias;
private int countUpdatedRows;
private Select targetMatchQuery;
private final HashMap<Value, Integer> targetRowidsRemembered = new HashMap<>();
private final TreeMap<Value, Integer> targetRowidsRemembered;
private int sourceQueryRowNumber;
......@@ -286,6 +286,7 @@ public class MergeUsing extends Prepared {
super(session);
this.targetTable = targetTableFilter.getTable();
this.targetTableFilter = targetTableFilter;
targetRowidsRemembered = new TreeMap<>(session.getDatabase().getCompareMode());
}
@Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论