提交 daf543c5 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Revert "Use TreeMap in MergeUsing for safety" and add a comment

This reverts commit 2cdafd3a.
上级 6547ef35
......@@ -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,11 @@ public class MergeUsing extends Prepared {
private String queryAlias;
private int countUpdatedRows;
private Select targetMatchQuery;
private final TreeMap<Value, Integer> targetRowidsRemembered;
/**
* Contains mappings between _ROWID_ and ROW_NUMBER for processed rows. Row
* identities are remembered to prevent duplicate updates of the same row.
*/
private final HashMap<Value, Integer> targetRowidsRemembered = new HashMap<>();
private int sourceQueryRowNumber;
......@@ -286,7 +290,6 @@ public class MergeUsing extends Prepared {
super(session);
this.targetTable = targetTableFilter.getTable();
this.targetTableFilter = targetTableFilter;
targetRowidsRemembered = new TreeMap<>(session.getDatabase().getCompareMode());
}
@Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论