int count = 0;
Expression[] colExpressions = updateExpressions;
RowSetNavigatorDataChange rowset =
session.sessionContext.getRowSetDataChange();
Type[] colTypes = baseTable.getColumnTypes();
RangeIterator it = RangeVariable.getIterator(session,
targetRangeVariables);
Result resultOut = null;
RowSetNavigator generatedNavigator = null;
if (generatedIndexes != null) {
resultOut = Result.newUpdateCountResult(generatedResultMetaData,
0);
generatedNavigator = resultOut.getChainedResult().getNavigator();
}
session.sessionContext.rownum = 1;
while (it.next()) {
session.sessionData.startRowProcessing();
Row row = it.getCurrentRow();
Object[] data = row.getData();
Object[] newData = getUpdatedData(session, targets, baseTable,
updateColumnMap, colExpressions,
colTypes, data);
if (updatableTableCheck != null) {
it.setCurrent(newData);
boolean check = updatableTableCheck.testCondition(session);
if (!check) {
it.release();
throw Error.error(ErrorCode.X_44000);
}
}
rowset.addRow(session, row, newData, colTypes, updateColumnMap);
session.sessionContext.rownum++;
}
rowset.endMainDataSet();
it.release();
/* debug 190
if (rowset.size() == 0) {
System.out.println(targetTable.getName().name + " zero update: session "
+ session.getId());
} else if (rowset.size() >1) {