Skip to content

Commit b51d09b

Browse files
committed
Added no-op for getters/setters
1 parent 186531c commit b51d09b

File tree

5 files changed

+66
-7
lines changed

5 files changed

+66
-7
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
xAzureSQLDW - - - - For tests not compatible with Azure Data Warehouse -
4444
xAzureSQLMI - - - - For tests not compatible with Azure SQL Managed Instance
4545
NTLM - - - - - - - For tests using NTLM Authentication mode (excluded by default)
46-
kerberos - - - - - For tests using Kerberos authentication (excluded by default)
46+
kerberos - - - - - For tests using Kerberos authentication (excluded by default)
4747
reqExternalSetup - For tests requiring external setup (excluded by default)
4848
clientCertAuth - - For tests requiring client certificate authentication
4949
setup (excluded by default) - - - - - - - - - - - - - - - - - - - - - - -

src/main/java/com/microsoft/sqlserver/jdbc/IOBuffer.java

-6
Original file line numberDiff line numberDiff line change
@@ -4884,7 +4884,6 @@ void writeRPCStringUnicode(String sName, String sValue, boolean bOut,
48844884
if (nValueLen > DataTypes.SHORT_VARTYPE_MAX_BYTES || bOut) {
48854885
writeRPCNameValType(sName, bOut, TDSType.NVARCHAR);
48864886

4887-
// Handle Yukon v*max type header here.
48884887
writeVMaxHeader(nValueLen, // Length
48894888
bValueNull, // Is null?
48904889
collation);
@@ -5482,7 +5481,6 @@ void writeTVPColumnMetaData(TVP value) throws SQLServerException {
54825481
// Use PLP encoding on Yukon and later with long values
54835482
if (!isShortValue) // PLP
54845483
{
5485-
// Handle Yukon v*max type header here.
54865484
writeShort((short) 0xFFFF);
54875485
con.getDatabaseCollation().writeCollation(this);
54885486
} else // non PLP
@@ -5500,7 +5498,6 @@ void writeTVPColumnMetaData(TVP value) throws SQLServerException {
55005498
isShortValue = pair.getValue().precision <= DataTypes.SHORT_VARTYPE_MAX_BYTES;
55015499
// Use PLP encoding on Yukon and later with long values
55025500
if (!isShortValue) // PLP
5503-
// Handle Yukon v*max type header here.
55045501
writeShort((short) 0xFFFF);
55055502
else // non PLP
55065503
writeShort((short) DataTypes.SHORT_VARTYPE_MAX_BYTES);
@@ -5683,7 +5680,6 @@ void writeRPCByteArray(String sName, byte[] bValue, boolean bOut, JDBCType jdbcT
56835680
writeRPCNameValType(sName, bOut, tdsType);
56845681

56855682
if (usePLP) {
5686-
// Handle Yukon v*max type header here.
56875683
writeVMaxHeader(nValueLen, bValueNull, collation);
56885684

56895685
// Send the data.
@@ -6464,7 +6460,6 @@ void writeRPCInputStream(String sName, InputStream stream, long streamLength, bo
64646460

64656461
writeRPCNameValType(sName, bOut, jdbcType.isTextual() ? TDSType.BIGVARCHAR : TDSType.BIGVARBINARY);
64666462

6467-
// Handle Yukon v*max type header here.
64686463
writeVMaxHeader(streamLength, false, jdbcType.isTextual() ? collation : null);
64696464
}
64706465

@@ -6604,7 +6599,6 @@ void writeRPCReaderUnicode(String sName, Reader re, long reLength, boolean bOut,
66046599

66056600
writeRPCNameValType(sName, bOut, TDSType.NVARCHAR);
66066601

6607-
// Handle Yukon v*max type header here.
66086602
writeVMaxHeader(
66096603
(DataTypes.UNKNOWN_STREAM_LENGTH == reLength) ? DataTypes.UNKNOWN_STREAM_LENGTH : 2 * reLength, // Length
66106604
// (in

src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerDataSource.java

+23
Original file line numberDiff line numberDiff line change
@@ -1346,4 +1346,27 @@ public interface ISQLServerDataSource extends javax.sql.CommonDataSource {
13461346
* @return cacheBulkCopyMetadata boolean value
13471347
*/
13481348
boolean getcacheBulkCopyMetadata();
1349+
1350+
/**
1351+
* useFlexibleCallableStatements is temporarily removed. This is meant as a no-op.
1352+
*
1353+
* Sets whether or not sp_sproc_columns will be used for parameter name lookup.
1354+
*
1355+
* @param useFlexibleCallableStatements
1356+
* When set to false, sp_sproc_columns is not used for parameter name lookup
1357+
* in callable statements. This eliminates a round trip to the server but imposes limitations
1358+
* on how parameters are set. When set to false, applications must either reference
1359+
* parameters by name or by index, not both. Parameters must also be set in the same
1360+
* order as the stored procedure definition.
1361+
*/
1362+
void setUseFlexibleCallableStatements(boolean useFlexibleCallableStatements);
1363+
1364+
/**
1365+
* useFlexibleCallableStatements is temporarily removed. This is meant as a no-op.
1366+
*
1367+
* Returns whether or not sp_sproc_columns is being used for parameter name lookup.
1368+
*
1369+
* @return useFlexibleCallableStatements
1370+
*/
1371+
boolean getUseFlexibleCallableStatements();
13491372
}

src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java

+25
Original file line numberDiff line numberDiff line change
@@ -8113,6 +8113,31 @@ public void setAccessTokenCallbackClass(String accessTokenCallbackClass) {
81138113
this.accessTokenCallbackClass = accessTokenCallbackClass;
81148114
}
81158115

8116+
/**
8117+
* useFlexibleCallableStatements is temporarily removed. This is meant as a no-op.
8118+
*
8119+
* Returns whether or not sp_sproc_columns is being used for parameter name lookup.
8120+
*
8121+
* @return useFlexibleCallableStatements
8122+
*/
8123+
public boolean getUseFlexibleCallableStatements() {
8124+
return true;
8125+
}
8126+
8127+
/**
8128+
* useFlexibleCallableStatements is temporarily removed. This is meant as a no-op.
8129+
*
8130+
* Sets whether or not sp_sproc_columns will be used for parameter name lookup.
8131+
*
8132+
* @param useFlexibleCallableStatements
8133+
* When set to false, sp_sproc_columns is not used for parameter name lookup
8134+
* in callable statements. This eliminates a round trip to the server but imposes limitations
8135+
* on how parameters are set. When set to false, applications must either reference
8136+
* parameters by name or by index, not both. Parameters must also be set in the same
8137+
* order as the stored procedure definition.
8138+
*/
8139+
public void setUseFlexibleCallableStatements(boolean useFlexibleCallableStatements) {}
8140+
81168141
/**
81178142
* Cleans up discarded prepared statement handles on the server using batched un-prepare actions if the batching
81188143
* threshold has been reached.

src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDataSource.java

+17
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,23 @@ public int getMsiTokenCacheTtl() {
12951295
return 0;
12961296
}
12971297

1298+
/**
1299+
* useFlexibleCallableStatements is temporarily removed.
1300+
* This method is a no-op for backwards compatibility only.
1301+
*/
1302+
@Override
1303+
public void setUseFlexibleCallableStatements(boolean enable) {}
1304+
1305+
1306+
/**
1307+
* useFlexibleCallableStatements is temporarily removed.
1308+
* This method is a no-op for backwards compatibility only.
1309+
*/
1310+
@Override
1311+
public boolean getUseFlexibleCallableStatements() {
1312+
return true;
1313+
}
1314+
12981315
/**
12991316
* Sets the {@link SQLServerAccessTokenCallback} delegate.
13001317
*

0 commit comments

Comments
 (0)