提交 55a5e522 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Fix MergeUsing.isTargetRowFound() error handling for lazy results

上级 e1f63550
......@@ -261,9 +261,16 @@ public class MergeUsing extends Prepared {
// and should not be repeated
targetRowidsRemembered.put(targetRowId, sourceQueryRowNumber);
if (rows.next()) {
int rowCount;
if (rows.isLazy()) {
for (rowCount = 2; rows.next(); rowCount++) {
}
} else {
rowCount = rows.getRowCount();
}
throw DbException.get(ErrorCode.DUPLICATE_KEY_1,
"Duplicate key updated "
+ rows.getRowCount()
+ rowCount
+ " rows at once, only 1 expected:_ROWID_="
+ targetRowId + ":in:"
+ targetTableFilter.getTable()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论