#2673 - Bug introduced in 13.3.1 via #2652 - incorrect binding of history query with SQL2011 standards based queries

This commit is contained in:
Rob Bygrave committed 2022-04-27 22:48:02 +12:00
1 parent 517556bfe3
commit 45233e96ab
2 files changed
+8 -3

No files matched your search

@@ -644,10 +644,12 @@ final class CQueryBuilder {
}
private void appendHistoryAsOfPredicate() {
if (query.isAsOfBaseTable() && !historySupport.isStandardsBased()) {
appendAndOrWhere();
sb.append(historySupport.getAsOfPredicate(request.baseTableAlias()));
if (query.isAsOfBaseTable()) {
query.incrementAsOfTableCount();
if (!historySupport.isStandardsBased()){
appendAndOrWhere();
sb.append(historySupport.getAsOfPredicate(request.baseTableAlias()));
}
}
}
@@ -134,6 +134,9 @@ final class DefaultDbSqlContext implements DbSqlContext {
String asOfView = historySupport.getAsOfView(table);
appendTable(table, asOfView);
if (asOfView != null) {
if (historySupport.isStandardsBased()) {
asOfTableCount++;
}
addAsOfOnClause = !historySupport.isStandardsBased();
}
}