diff --git a/contrib/babelfishpg_tds/src/backend/tds/tdsresponse.c b/contrib/babelfishpg_tds/src/backend/tds/tdsresponse.c index 6a46416a09e..69334e12b5a 100644 --- a/contrib/babelfishpg_tds/src/backend/tds/tdsresponse.c +++ b/contrib/babelfishpg_tds/src/backend/tds/tdsresponse.c @@ -1855,17 +1855,36 @@ PrepareRowDescription(TupleDesc typeinfo, PlannedStmt *plannedstmt, List *target /* If this is vector datatype, we should adjust the typmod */ if (is_sys_vector_datatype(col->pgTypeOid)) atttypmod = -1; - - SetColMetadataForCharTypeHelper(col, TDS_TYPE_VARCHAR, - att->attcollation, (atttypmod == -1) ? - (tdsVersion >= TDS_VERSION_7_2 ? atttypmod : 0xfffe) : - (atttypmod - 4)); + /* + * If client being connected is using TDS version lower than or equal to + * 7.1 then TSQL treats varchar(max) as Text. + */ + if (tdsVersion <= TDS_VERSION_7_1_1 && atttypmod == -1) + { + SetColMetadataForTextTypeHelper(col, TDS_TYPE_TEXT, + att->attcollation, (atttypmod - 4)); + sendTableName |= col->sendTableName; + } + else + SetColMetadataForCharTypeHelper(col, TDS_TYPE_VARCHAR, + att->attcollation, (atttypmod == -1) ? + atttypmod : (atttypmod - 4)); break; case TDS_SEND_NVARCHAR: - SetColMetadataForCharTypeHelper(col, TDS_TYPE_NVARCHAR, - att->attcollation, (atttypmod == -1) ? - (tdsVersion >= TDS_VERSION_7_2 ? atttypmod : 0xfffe) : - (atttypmod - 4) * 2); + /* + * If client being connected is using TDS version lower than or equal to + * 7.1 then TSQL treats nvarchar(max) as NText. + */ + if (tdsVersion <= TDS_VERSION_7_1_1 && atttypmod == -1) + { + SetColMetadataForTextTypeHelper(col, TDS_TYPE_NTEXT, + att->attcollation, (atttypmod - 4) * 2); + sendTableName |= col->sendTableName; + } + else + SetColMetadataForCharTypeHelper(col, TDS_TYPE_NVARCHAR, + att->attcollation, (atttypmod == -1) ? + atttypmod : (atttypmod - 4) * 2); break; case TDS_SEND_MONEY: if (col->attNotNull) @@ -1978,9 +1997,18 @@ PrepareRowDescription(TupleDesc typeinfo, PlannedStmt *plannedstmt, List *target case TDS_SEND_VARBINARY: if (atttypmod == -1 && tle != NULL) atttypmod = resolve_varbinary_typmod_from_exp((Node *) tle->expr); - SetColMetadataForBinaryType(col, TDS_TYPE_VARBINARY, (atttypmod == -1) ? - (tdsVersion >= TDS_VERSION_7_2 ? atttypmod : 0xfffe) : - atttypmod - VARHDRSZ); + /* + * If client being connected is using TDS version lower than or equal to + * 7.1 then TSQL treats varbinary(max) as Image. + */ + if (tdsVersion <= TDS_VERSION_7_1_1 && atttypmod == -1) + { + SetColMetadataForImageType(col, TDS_TYPE_IMAGE); + sendTableName |= col->sendTableName; + } + else + SetColMetadataForBinaryType(col, TDS_TYPE_VARBINARY, (atttypmod == -1) ? + atttypmod : atttypmod - VARHDRSZ); break; case TDS_SEND_UNIQUEIDENTIFIER: SetColMetadataForFixedType(col, TDS_TYPE_UNIQUEIDENTIFIER, TDS_MAXLEN_UNIQUEIDENTIFIER); diff --git a/contrib/babelfishpg_tds/src/backend/tds/tdstypeio.c b/contrib/babelfishpg_tds/src/backend/tds/tdstypeio.c index b03a7f394b5..acc49a04fd4 100644 --- a/contrib/babelfishpg_tds/src/backend/tds/tdstypeio.c +++ b/contrib/babelfishpg_tds/src/backend/tds/tdstypeio.c @@ -2775,9 +2775,18 @@ TdsSendTypeVarchar(FmgrInfo *finfo, Datum value, void *vMetaData) * store given string in given encoding. */ maxLen; /* max size of given column in bytes */ char *destBuf, - *buf = OutputFunctionCall(finfo, value); + *buf; TdsColumnMetaData *col = (TdsColumnMetaData *) vMetaData; + /* + * If client being connected is using TDS version lower than or equal to + * 7.1 then TSQL treats varchar(max) as Text. + */ + if (GetClientTDSVersion() <= TDS_VERSION_7_1_1 && + col->metaEntry.type3.tdsTypeId == TDS_TYPE_TEXT) + return TdsSendTypeText(finfo, value, vMetaData); + + buf = OutputFunctionCall(finfo, value); len = strlen(buf); destBuf = TdsEncodingConversion(buf, len, PG_UTF8, col->encoding, &actualLen); @@ -2835,11 +2844,21 @@ TdsSendTypeVarbinary(FmgrInfo *finfo, Datum value, void *vMetaData) int rc = EOF, len = 0, maxlen = 0; - bytea *vlena = DatumGetByteaPCopy(value); - char *buf = VARDATA_ANY(vlena); + bytea *vlena; + char *buf; TdsColumnMetaData *col = (TdsColumnMetaData *) vMetaData; + /* + * If client being connected is using TDS version lower than or equal to + * 7.1 then TSQL treats varbinary(max) as Image. + */ + if (GetClientTDSVersion() <= TDS_VERSION_7_1_1 && + col->metaEntry.type8.tdsTypeId == TDS_TYPE_IMAGE) + return TdsSendTypeImage(finfo, value, vMetaData); + maxlen = col->metaEntry.type7.maxSize; + vlena = DatumGetByteaPCopy(value); + buf = VARDATA_ANY(vlena); len = VARSIZE_ANY_EXHDR(vlena); if (maxlen != 0xffff) @@ -2957,10 +2976,19 @@ TdsSendTypeNVarchar(FmgrInfo *finfo, Datum value, void *vMetaData) int rc, maxlen; - char *out = OutputFunctionCall(finfo, value); + char *out; TdsColumnMetaData *col = (TdsColumnMetaData *) vMetaData; StringInfoData buf; + /* + * If client being connected is using TDS version lower than or equal to + * 7.1 then TSQL treats nvarchar(max) as NText. + */ + if (GetClientTDSVersion() <= TDS_VERSION_7_1_1 && + col->metaEntry.type3.tdsTypeId == TDS_TYPE_NTEXT) + return TdsSendTypeNText(finfo, value, vMetaData); + + out = OutputFunctionCall(finfo, value); initStringInfo(&buf); TdsUTF8toUTF16StringInfo(&buf, out, strlen(out)); maxlen = col->metaEntry.type2.maxSize; diff --git a/test/JDBC/expected/jtds-TestBinary.out b/test/JDBC/expected/jtds-TestBinary.out new file mode 100644 index 00000000000..679905c3e14 --- /dev/null +++ b/test/JDBC/expected/jtds-TestBinary.out @@ -0,0 +1,69 @@ +CREATE TABLE BINARY_dt(a BINARY(8), b VARBINARY(10)); +#inserting random values +INSERT INTO BINARY_dt(a, b) values (1234, 12345); +~~ROW COUNT: 1~~ + +INSERT INTO BINARY_dt(a, b) values (NULL, NULL); +~~ROW COUNT: 1~~ + +#INSERT INTO BINARY_dt(a, b) values (0x31323334, 0x3132333435); +SELECT * FROM BINARY_dt +~~START~~ +binary#!#varbinary +00000000000004D2#!#00003039 +#!# +~~END~~ + +#prepst#!# INSERT INTO BINARY_dt(a, b) values(@a, @b) #!#binary|-|a|-|1234#!#varbinary|-|b|-|12345 +DROP TABLE BINARY_dt + + +CREATE TABLE BINARY_dt(a VARBINARY(max)); +INSERT INTO BINARY_dt(a) values (NULL); +~~ROW COUNT: 1~~ + +SELECT * FROM BINARY_dt; +~~START~~ +image + +~~END~~ + +DROP TABLE BINARY_dt; + +create table BINARY_dt (a VARBINARY(max), b int, c int, d int, e int ,f int, g int, h int, i int); +insert into BINARY_dt (a,b,c,d,e,f,g,h,i) values (NULL,1,2,3,4,5,6,7,8); +~~ROW COUNT: 1~~ + +select * from BINARY_dt; +~~START~~ +image#!#int#!#int#!#int#!#int#!#int#!#int#!#int#!#int +#!#1#!#2#!#3#!#4#!#5#!#6#!#7#!#8 +~~END~~ + +drop table BINARY_dt; + +CREATE TABLE BINARY_dt(a BINARY(8), b VARBINARY(10)); +INSERT INTO BINARY_dt(a, b) values (1234, 12345); +~~ROW COUNT: 1~~ + +prepst#!# INSERT INTO BINARY_dt(a, b) values(?, ?) #!#binary|-|a|-|1234#!#varbinary|-|b|-|12345 +~~ROW COUNT: 1~~ + +prepst#!#exec#!#binary|-|a|-|12345678#!#varbinary|-|b|-|12345 +~~ROW COUNT: 1~~ + +prepst#!#exec#!#binary|-|a|-|1234#!#varbinary|-|b|-|123456789 +~~ROW COUNT: 1~~ + +SELECT * FROM BINARY_dt; +~~START~~ +binary#!#varbinary +00000000000004D2#!#00003039 +3132333400000000#!#3132333435 +3132333435363738#!#3132333435 +3132333400000000#!#313233343536373839 +~~END~~ + +DROP TABLE BINARY_dt; + + diff --git a/test/JDBC/expected/jtds-TestXML.out b/test/JDBC/expected/jtds-TestXML.out index c578cb43322..b156147bd52 100644 --- a/test/JDBC/expected/jtds-TestXML.out +++ b/test/JDBC/expected/jtds-TestXML.out @@ -34,7 +34,7 @@ INSERT [dbo].[NOTIFICATION_DEFINITION] VALUES (13, N'INTRA_MSG', N'Intra-System SELECT ID,NAME_TX,LOCK_ID,DESCRIPTION_TX,N'' as emptystring, SCHEDULE_XML,DEFAULT_SENDER_TX,SETTINGS_XML,AGENCY_ID FROM NOTIFICATION_DEFINITION ~~START~~ -bigint#!#nvarchar#!#tinyint#!#nvarchar#!#nvarchar#!#ntext#!#nvarchar#!#ntext#!#bigint +bigint#!#nvarchar#!#tinyint#!#ntext#!#nvarchar#!#ntext#!#nvarchar#!#ntext#!#bigint 13#!#INTRA_MSG#!#63#!#Intra-System Message#!##!##!#donotreply_OPMQA@ospreycompliancesuite.com#!#NTF_SUB_INTRA_MSGNTF_MSG_INTRA_MSGPolicyDocumentTemplateVars11#!#1 ~~END~~ @@ -47,7 +47,7 @@ prepst#!# INSERT [dbo].[NOTIFICATION_DEFINITION] VALUES(?, ?, ?, ?, ?, ?, ?, ?) #INSERT [dbo].[NOTIFICATION_DEFINITION] VALUES (13, N'INTRA_MSG', N'Intra-System Message', NULL, N'donotreply_OPMQA@ospreycompliancesuite.com', 63,N'NTF_SUB_INTRA_MSGNTF_MSG_INTRA_MSGPolicyDocumentTemplateVars11', 1) SELECT ID,NAME_TX,LOCK_ID,DESCRIPTION_TX,N'' as emptystring, SCHEDULE_XML,DEFAULT_SENDER_TX,SETTINGS_XML,AGENCY_ID FROM NOTIFICATION_DEFINITION ~~START~~ -bigint#!#nvarchar#!#tinyint#!#nvarchar#!#nvarchar#!#ntext#!#nvarchar#!#ntext#!#bigint +bigint#!#nvarchar#!#tinyint#!#ntext#!#nvarchar#!#ntext#!#nvarchar#!#ntext#!#bigint 13#!#INTRA_MSG#!#63#!#Intra-System Message#!##!#NULL#!#donotreply_OPMQA#!#NTF_SUB_INTRA_MSGNTF_MSG_INTRA_MSGPolicyDocumentTemplateVars11#!#1 ~~END~~ diff --git a/test/JDBC/expected/jtds-nvarchar-max-length-check.out b/test/JDBC/expected/jtds-nvarchar-max-length-check.out index 70e1609feac..b966a759383 100644 --- a/test/JDBC/expected/jtds-nvarchar-max-length-check.out +++ b/test/JDBC/expected/jtds-nvarchar-max-length-check.out @@ -109,7 +109,7 @@ int#!#int select col1 from jtds_nvarchar_max_tab1 where exp_count = 8192 go ~~START~~ -nvarchar +ntext lj3wqE3KGfAxmLgfCgwNpKqZViapgUUjrSxzoebtvyVCWYew9Y3yJ8GEzhpjoMmX4uyJp45fjKxHhANMZzr1dqgcQmMJNT2Mbyp1v06WvKWX3fpJyzYAKNZOY3lkJ1z6tQCrp7KnW8QxWM9BjsR8XEHiwM8PA2i8XBPJMcHi9p0bYBIQNGar3bvAdvgGKzbBwLrui6MHI0nNTjNE1duq6ceULP8DwvCaBnq5CsWMfD2tiUS47PuV3BGvMPxkw2t7AALdAoIE7hiPPNCLsGGC7sdPoB39SZfJ0xrxodKjKDgG1XsWXsO9Q8a3yUnjmhUcRacLS9WFUaxfzKVIaVxUjOqBTGct3TC2J3huk58ocl899X851HhVJA4RbPyS4LZSrlGrVDPsmtNM4OH1p5c4FOhUVz1cQet91wIZAvjOupVtVDPbDEOmhvtnL2Lo1ndY4PxSBAM1hG4RCJiFDqKhzrlADzK4ejk5e6kwsu81Y8PzWLJ1czlrEXaGdEdSq0Z7lj3wqE3KGfAxmLgfCgwNpKqZViapgUUjrSxzoebtvyVCWYew9Y3yJ8GEzhpjoMmX4uyJp45fjKxHhANMZzr1dqgcQmMJNT2Mbyp1v06WvKWX3fpJyzYAKNZOY3lkJ1z6tQCrp7KnW8QxWM9BjsR8XEHiwM8PA2i8XBPJMcHi9p0bYBIQNGar3bvAdvgGKzbBwLrui6MHI0nNTjNE1duq6ceULP8DwvCaBnq5CsWMfD2tiUS47PuV3BGvMPxkw2t7AALdAoIE7hiPPNCLsGGC7sdPoB39SZfJ0xrxodKjKDgG1XsWXsO9Q8a3yUnjmhUcRacLS9WFUaxfzKVIaVxUjOqBT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KxHhANMZzr1dqgcQmMJNT2Mbyp1v06WvKWX3fpJyzYAKNZOY3lkJ1z6tQCrp7KnW8QxWM9BjsR8XEHiwM8PA2i8XBPJMcHi9p0bYBIQNGar3bvAdvgGKzbBwLrui6MHI0nNTjNE1duq6ceULP8DwvCaBnq5CsWMfD2tiUS47PuV3BGvMPxkw2t7AALdAoIE7hiPPNCLsGGC7sdPoB39SZfJ0xrxodKjKDgG1XsWXsO9Q8a3yUnjmhUcRacLS9WFUaxfzKVIaVxUjOqBTGct3TC2J3huk58ocl899X851HhVJA4RbPyS4LZSrlGrVDPsmtNM4OH1p5c4FOhUVz1cQet91wIZAvjOupVtVDPbDEOmhvtnL2Lo1ndY4PxSBAM1hG4RCJiFDqKhzrlADzK4ejk5e6kwsu81Y8PzWLJ1czlrEXaGdEdSq0Z7lj3wqE3KGfAxmLgfCgwNpKqZViapgUUjrSxzoebtvyVCWYew9Y3yJ8GEzhpjoMmX4uyJp45fjKxHhANMZzr1dqgcQmMJNT2Mbyp1v06WvKWX3fpJyzYAKNZOY3lkJ1z6tQCrp7KnW8QxWM9BjsR8XEHiwM8PA2i8XBPJMcHi9p0bYBIQNGar3bvAdvgGKzbBwLrui6MHI0nNTjNE1duq6ceULP8DwvCaBnq5CsWMfD2tiUS47PuV3BGvMPxkw2t7AALdAoIE7hiPPNCLsGGC7sdPoB39SZfJ0xrxodKjKDgG1XsWXsO9Q8a3yUnjmhUcRacLS9WFUaxfzKVIaVxUjOqBTGct3TC2J3huk58ocl899X851HhVJA4RbPyS4LZSrlGrVDPsmtNM4OH1p5c4FOhUVz1cQet91wIZAvjOupVtVDPbDEOmhvtnL2Lo1ndY4PxSBAM1hG4RCJiFDqKhzrlADzK4ejk5e6kwsu81Y8PzWLJ1czlrEXaGdEdSq0Z7 ~~END~~ diff --git a/test/JDBC/expected/jtds-varchar-max-length-check.out b/test/JDBC/expected/jtds-varchar-max-length-check.out index 134047b642c..0fa718eb134 100644 --- a/test/JDBC/expected/jtds-varchar-max-length-check.out +++ b/test/JDBC/expected/jtds-varchar-max-length-check.out @@ -101,7 +101,7 @@ int#!#int select col1 from jtds_varchar_max_tab1 where exp_count = 8192 go ~~START~~ -varchar +text lj3wqE3KGfAxmLgfCgwNpKqZViapgUUjrSxzoebtvyVCWYew9Y3yJ8GEzhpjoMmX4uyJp45fjKxHhANMZzr1dqgcQmMJNT2Mbyp1v06WvKWX3fpJyzYAKNZOY3lkJ1z6tQCrp7KnW8QxWM9BjsR8XEHiwM8PA2i8XBPJMcHi9p0bYBIQNGar3bvAdvgGKzbBwLrui6MHI0nNTjNE1duq6ceULP8DwvCaBnq5CsWMfD2tiUS47PuV3BGvMPxkw2t7AALdAoIE7hiPPNCLsGGC7sdPoB39SZfJ0xrxodKjKDgG1XsWXsO9Q8a3yUnjmhUcRacLS9WFUaxfzKVIaVxUjOqBTGct3TC2J3huk58ocl899X851HhVJA4RbPyS4LZSrlGrVDPsmtNM4OH1p5c4FOhUVz1cQet91wIZAvjOupVtVDPbDEOmhvtnL2Lo1ndY4PxSBAM1hG4RCJiFDqKhzrlADzK4ejk5e6kwsu81Y8PzWLJ1czlrEXaGdEdSq0Z7lj3wqE3KGfAxmLgfCgwNpKqZViapgUUjrSxzoebtvyVCWYew9Y3yJ8GEzhpjoMmX4uyJp45fjKxHhANMZzr1dqgcQmMJNT2Mbyp1v06WvKWX3fpJyzYAKNZOY3lkJ1z6tQCrp7KnW8QxWM9BjsR8XEHiwM8PA2i8XBPJMcHi9p0bYBIQNGar3bvAdvgGKzbBwLrui6MHI0nNTjNE1duq6ceULP8DwvCaBnq5CsWMfD2tiUS47PuV3BGvMPxkw2t7AALdAoIE7hiPPNCLsGGC7sdPoB39SZfJ0xrxodKjKDgG1XsWXsO9Q8a3yUnjmhUcRacLS9WFUaxfzKVIaVxUjOqBTGct3TC2J3huk58ocl899X851HhVJA4RbPyS4LZSrlGrVDPsmtNM4OH1p5c4FOhUVz1cQet91wIZAvjOupVtVDPbDEOmhvtnL2Lo1ndY4P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p0bYBIQNGar3bvAdvgGKzbBwLrui6MHI0nNTjNE1duq6ceULP8DwvCaBnq5CsWMfD2tiUS47PuV3BGvMPxkw2t7AALdAoIE7hiPPNCLsGGC7sdPoB39SZfJ0xrxodKjKDgG1XsWXsO9Q8a3yUnjmhUcRacLS9WFUaxfzKVIaVxUjOqBTGct3TC2J3huk58ocl899X851HhVJA4RbPyS4LZSrlGrVDPsmtNM4OH1p5c4FOhUVz1cQet91wIZAvjOupVtVDPbDEOmhvtnL2Lo1ndY4PxSBAM1hG4RCJiFDqKhzrlADzK4ejk5e6kwsu81Y8PzWLJ1czlrEXaGdEdSq0Z7lj3wqE3KGfAxmLgfCgwNpKqZViapgUUjrSxzoebtvyVCWYew9Y3yJ8GEzhpjoMmX4uyJp45fjKxHhANMZzr1dqgcQmMJNT2Mbyp1v06WvKWX3fpJyzYAKNZOY3lkJ1z6tQCrp7KnW8QxWM9BjsR8XEHiwM8PA2i8XBPJMcHi9p0bYBIQNGar3bvAdvgGKzbBwLrui6MHI0nNTjNE1duq6ceULP8DwvCaBnq5CsWMfD2tiUS47PuV3BGvMPxkw2t7AALdAoIE7hiPPNCLsGGC7sdPoB39SZfJ0xrxodKjKDgG1XsWXsO9Q8a3yUnjmhUcRacLS9WFUaxfzKVIaVxUjOqBTGct3TC2J3huk58ocl899X851HhVJA4RbPyS4LZSrlGrVDPsmtNM4OH1p5c4FOhUVz1cQet91wIZAvjOupVtVDPbDEOmhvtnL2Lo1ndY4PxSBAM1hG4RCJiFDqKhzrlADzK4ejk5e6kwsu81Y8PzWLJ1czlrEXaGdEdSq0Z7 ~~END~~ diff --git a/test/JDBC/input/jtds/jtds-TestBinary.txt b/test/JDBC/input/jtds/jtds-TestBinary.txt new file mode 100644 index 00000000000..e4f4c5a5396 --- /dev/null +++ b/test/JDBC/input/jtds/jtds-TestBinary.txt @@ -0,0 +1,29 @@ +CREATE TABLE BINARY_dt(a BINARY(8), b VARBINARY(10)); +#inserting random values +INSERT INTO BINARY_dt(a, b) values (1234, 12345); +INSERT INTO BINARY_dt(a, b) values (NULL, NULL); +#INSERT INTO BINARY_dt(a, b) values (0x31323334, 0x3132333435); +SELECT * FROM BINARY_dt +#prepst#!# INSERT INTO BINARY_dt(a, b) values(@a, @b) #!#binary|-|a|-|1234#!#varbinary|-|b|-|12345 +DROP TABLE BINARY_dt + + +CREATE TABLE BINARY_dt(a VARBINARY(max)); +INSERT INTO BINARY_dt(a) values (NULL); +SELECT * FROM BINARY_dt; +DROP TABLE BINARY_dt; + +create table BINARY_dt (a VARBINARY(max), b int, c int, d int, e int ,f int, g int, h int, i int); +insert into BINARY_dt (a,b,c,d,e,f,g,h,i) values (NULL,1,2,3,4,5,6,7,8); +select * from BINARY_dt; +drop table BINARY_dt; + +CREATE TABLE BINARY_dt(a BINARY(8), b VARBINARY(10)); +INSERT INTO BINARY_dt(a, b) values (1234, 12345); +prepst#!# INSERT INTO BINARY_dt(a, b) values(@a, @b) #!#binary|-|a|-|1234#!#varbinary|-|b|-|12345 +prepst#!#exec#!#binary|-|a|-|12345678#!#varbinary|-|b|-|12345 +prepst#!#exec#!#binary|-|a|-|1234#!#varbinary|-|b|-|123456789 +SELECT * FROM BINARY_dt; +DROP TABLE BINARY_dt; + + diff --git a/test/JDBC/jdbc_schedule b/test/JDBC/jdbc_schedule index b4387a1ce98..6bd4b8d856c 100644 --- a/test/JDBC/jdbc_schedule +++ b/test/JDBC/jdbc_schedule @@ -292,6 +292,7 @@ ignore#!#jtds-TestTableType-vu-verify ignore#!#jtds-TestTableType-vu-cleanup ignore#!#jtds-TestDate ignore#!#jtds-TestDatetime +ignore#!#jtds-TestBinary ignore#!#jtds-TestSimpleErrors ignore#!#jtds-TestErrorsWithTryCatch ignore#!#jtds-TestSQLQueries diff --git a/test/JDBC/jtds_jdbc_schedule b/test/JDBC/jtds_jdbc_schedule index b963e22115e..bce4f0e2eea 100644 --- a/test/JDBC/jtds_jdbc_schedule +++ b/test/JDBC/jtds_jdbc_schedule @@ -52,7 +52,8 @@ TestSmallDatetime # Parameter 3 (""): Data type 0x63 has an invalid data length or metadata length. # TestText TestChar -TestBinary +# Image column type is returned for varbinary(max) on both MSSQL and Babelfish +jtds-TestBinary TestImage-vu-prepare TestImage-vu-verify TestImage-vu-cleanup