GUACAMOLE-926: Disable batch executor for SQL Server JDBC extension - it doesn't work.

This commit is contained in:
James Muehlner
2023-05-11 00:12:43 +00:00
parent e91d5a99ee
commit c4e6b046ae
3 changed files with 38 additions and 4 deletions

View File

@@ -295,6 +295,21 @@ public class SQLServerEnvironment extends JDBCEnvironment {
true);
}
@Override
public boolean shouldUseBatchExecutor() {
// The SQL Server driver does not work when batch execution is enabled.
// Specifically, inserts fail with com.microsoft.sqlserver.jdbc.SQLServerException:
// The statement must be executed before any results can be obtained.
// See https://github.com/microsoft/mssql-jdbc/issues/358 for more.
logger.warn(
"JDBC batch executor is disabled for SQL Server Connections. "
+ "Large batched updates may run slower."
);
return false;
}
/**
* Returns true if all server certificates should be trusted, including
* those signed by an unknown certificate authority, such as self-signed