fix(sql): preserve duplicate OceanBase Oracle projections when paging

Closes #10722
This commit is contained in:
t8y2 committed 2026-10-02 18:40:46 +00:00
1 parent c30b198455
commit 6d1c3c8373
10 files changed
+702 -18

No files matched your search

+4
View File
@@ -7710,6 +7710,10 @@ export const useQueryStore = defineStore("query", () => {
firstPageUsesActualSql: hiddenPrimaryKeys.length > 0,
});
const canPaginateSqlServerUseScript = !!sqlServerUseScript && !!plan.pageSql && typeof plan.pageLimit === "number" && typeof plan.pageOffset === "number";
if (plan.paginationError) throw new Error(plan.paginationError);
if (effectiveDbType === "oceanbase-oracle" && tab.autoCommit === false && plan.useAgentResultSession && !plan.pageSql && pagination.offset > 0 && !pagination.sessionId) {
throw new Error("This query requires an existing result session for offset pagination in a manual transaction");
}
if (sqlServerUseScript && !canPaginateSqlServerUseScript) {
sqlToExecute = sqlBeforePagination;
} else {