fix(query): stop doubling global query timeout

This commit is contained in:
zipg authored and GitHub committed 2026-09-16 23:21:57 +08:00
1 parent e8affe9436
commit 1ed06f270b
4 files changed
+21 -14

No files matched your search

+1 -2
View File
@@ -56,9 +56,8 @@ export function frontendQueryTimeoutSecsForSql(sql: string, databaseType: Databa
// the timeout for row-returning PostgreSQL statements.
if (databaseType === "postgres" && postgresQueryMayReturnRows(sql, databaseType)) return 0;
const baseTimeoutSecs = Math.max(queryTimeoutSecs * 2, 60);
const statementCount = Math.max(splitSqlStatementRanges(sql, databaseType, parameterOptions ?? sqlStatementParameterOptionsForCompatibility(databaseType)).length, 1);
return baseTimeoutSecs * statementCount;
return queryTimeoutSecs * statementCount;
}
export function frontendQueryTimeoutDelayMs(timeoutSecs: number): number | undefined {