Skip to content

Commit aa41b3d

Browse files
committed
Use unique PRDID of JNT
1 parent d7eebc0 commit aa41b3d

File tree

6 files changed

+19
-27
lines changed

6 files changed

+19
-27
lines changed

vertx-db2-client/src/main/java/io/vertx/db2client/impl/drda/DRDAConnectResponse.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,8 +1759,7 @@ private void parseEXCSATRD() {
17591759
}
17601760

17611761
if (!foundInPass) {
1762-
throw new IllegalStateException(String.format("Did not find a codepoint in this pass: %02x", peekCP));
1763-
//doPrmnsprmSemantics(peekCP);
1762+
throwUnknownCodepoint(peekCP);
17641763
}
17651764

17661765
if (!srvrlslvReceived)

vertx-db2-client/src/main/java/io/vertx/db2client/impl/drda/DRDAConstants.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,9 @@ public class DRDAConstants {
347347
/** Constant indicating that the user stream was too long. */
348348
public static final byte STREAM_TOO_LONG = 0x04;
349349

350-
// // Product id of the ClientDNC.
351-
public static final String PRDID = "JCC04250";
352-
353-
public static final String EXTNAM = "db2jcc_application " + PRDID + "300";
350+
// Product id
351+
public static final String PRDID = "JNT00001";
352+
public static final String EXTNAM = "db2jnt_application " + PRDID + "300";
354353

355354
static final DateTimeFormatter DB2_DATE_FORMAT = DateTimeFormatter.ofPattern("yyyy'-'MM'-'dd");
356355
static final DateTimeFormatter DB2_TIME_FORMAT = DateTimeFormatter.ofPattern("HH'.'mm'.'ss");

vertx-db2-client/src/main/java/io/vertx/db2client/impl/drda/DRDAQueryResponse.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3301,12 +3301,6 @@ private void parseSQLDXGRP(ColumnMetaData columnMetaData, int column) {
33013301
// SQLXNAME_s; PROTOCOL TYPE VCS; ENVLID 0x32; Length Override 255
33023302
String sqlxname = parseFastVCMorVCS(); // ID
33033303

3304-
// @AGG manually skip 1 unknown byte
3305-
if (!metadata.isZos()) {
3306-
if (readUnsignedByte() != CodePoint.NULLDATA)
3307-
throw new IllegalStateException("@AGG expecting 0xFF here");
3308-
}
3309-
33103304
if (columnMetaData.sqlxKeymem_ == null) {
33113305
columnMetaData.sqlxKeymem_ = new short[columnMetaData.columns_];
33123306
}

vertx-db2-client/src/test/java/io/vertx/db2client/tck/DB2BinaryDataTypeDecodeTest.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,8 @@ protected void initConnector() {
3636
@Test
3737
@Override
3838
public void testBoolean(TestContext ctx) {
39-
if (!rule.isZOS()) {
40-
super.testBoolean(ctx);
41-
return;
42-
}
43-
4439
// DB2/Z does not support BOOLEAN column type, use TINYINT instead
40+
// DB2/LUW has a BOOLEAN column type but it is just an alias for TINYINT
4541
connector.connect(ctx.asyncAssertSuccess(conn -> {
4642
conn
4743
.preparedQuery("SELECT test_boolean FROM basicdatatype WHERE id = 1")

vertx-db2-client/src/test/java/io/vertx/db2client/tck/DB2BinaryDataTypeEncodeTest.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,8 @@ public void testDouble(TestContext ctx) {
4646

4747
@Override
4848
public void testBoolean(TestContext ctx) {
49-
if (!rule.isZOS()) {
50-
super.testBoolean(ctx);
51-
return;
52-
}
53-
5449
// DB2/Z doesn't have a BOOLEAN column type and uses TINYINT instead
50+
// DB2/LUW has a BOOLEAN column type but it is just an alias for TINYINT
5551
connector.connect(ctx.asyncAssertSuccess(conn -> {
5652
conn
5753
.preparedQuery("UPDATE basicdatatype SET test_boolean = ? WHERE id = 2")

vertx-db2-client/src/test/java/io/vertx/db2client/tck/DB2TextDataTypeDecodeTest.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
package io.vertx.db2client.tck;
22

3+
import org.junit.Before;
34
import org.junit.ClassRule;
5+
import org.junit.Rule;
46
import org.junit.Test;
7+
import org.junit.rules.TestName;
58
import org.junit.runner.RunWith;
69

10+
import io.vertx.core.Vertx;
711
import io.vertx.db2client.junit.DB2Resource;
812
import io.vertx.ext.unit.Async;
913
import io.vertx.ext.unit.TestContext;
@@ -15,6 +19,14 @@
1519
public class DB2TextDataTypeDecodeTest extends TextDataTypeDecodeTestBase {
1620
@ClassRule
1721
public static DB2Resource rule = DB2Resource.SHARED_INSTANCE;
22+
23+
@Rule
24+
public TestName testName = new TestName();
25+
26+
@Before
27+
public void printTestName(TestContext ctx) throws Exception {
28+
System.out.println(">>> BEGIN " + getClass().getSimpleName() + "." + testName.getMethodName());
29+
}
1830

1931
@Override
2032
protected void initConnector() {
@@ -24,12 +36,8 @@ protected void initConnector() {
2436
@Test
2537
@Override
2638
public void testBoolean(TestContext ctx) {
27-
if (!rule.isZOS()) {
28-
super.testBoolean(ctx);
29-
return;
30-
}
31-
3239
// DB2/z does not have a BOOLEAN column type and instead must use TINYINT
40+
// DB2/LUW has a BOOLEAN column type but it is an alias for TINYINT
3341
Async async = ctx.async();
3442
connector.connect(ctx.asyncAssertSuccess(conn -> {
3543
conn.query("SELECT test_boolean FROM basicdatatype WHERE id = 1").execute(ctx.asyncAssertSuccess(result -> {

0 commit comments

Comments
 (0)