You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft SQL Server 2016 (SP2) (KB4052908) - 13.0.5026.0 (X64) Mar 18 2018 09:11:49 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows 10 Pro 10.0 (Build 18363: ) (Hypervisor)-->
Client Operating System
Windows/Linux
JAVA/JVM version
11.0.6
Table schema
Table will be created by test.
create table TEST2 (KEY1 numeric(19,0) not null, KEY2 numeric(19,0) not null, primary key (KEY1, KEY2))
Problem description
Prepare database with always encrypted feature. Update connection details in ExecuteBatchTest.java and run tests in attached gradle project.
Expected behaviour:
No column is encrypted, so it does not matter, whether columnEncryptionSetting is enabled or not.
Actual behaviour:
Only test with connection string containing "columnEncryptionSetting=Enabled" fails.
Error message/stack trace: Index 2 out of bounds for length 2 java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2 at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatementBatch(SQLServerPreparedStatement.java:2764) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtBatchExecCmd.doExecute(SQLServerPreparedStatement.java:2675) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7417) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3274) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:247) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:222) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:2076) at ExecuteBatchTest.executeBatch(ExecuteBatchTest.java:83)
Any other details that can be helpful:
PreparedStatement executed after clearParameters() fails. cryptoMetaBatch list should be cleared in clearParameters().
Driver version
9.1.1.jre11-preview (8.4.1.jre11 is affected too)
SQL Server version
Microsoft SQL Server 2016 (SP2) (KB4052908) - 13.0.5026.0 (X64) Mar 18 2018 09:11:49 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows 10 Pro 10.0 (Build 18363: ) (Hypervisor)-->
Client Operating System
Windows/Linux
JAVA/JVM version
11.0.6
Table schema
Table will be created by test.
create table TEST2 (KEY1 numeric(19,0) not null, KEY2 numeric(19,0) not null, primary key (KEY1, KEY2))
Problem description
Prepare database with always encrypted feature. Update connection details in ExecuteBatchTest.java and run tests in attached gradle project.
No column is encrypted, so it does not matter, whether columnEncryptionSetting is enabled or not.
Only test with connection string containing "columnEncryptionSetting=Enabled" fails.
Index 2 out of bounds for length 2 java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2 at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatementBatch(SQLServerPreparedStatement.java:2764) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtBatchExecCmd.doExecute(SQLServerPreparedStatement.java:2675) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7417) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3274) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:247) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:222) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:2076) at ExecuteBatchTest.executeBatch(ExecuteBatchTest.java:83)
PreparedStatement executed after clearParameters() fails. cryptoMetaBatch list should be cleared in clearParameters().
JDBC trace logs
mssql-jdbc-trace.txt
Reproduction code
mssql-batch-sample-clearparams.zip
The text was updated successfully, but these errors were encountered: