Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-972

tests derbynet/csPrepStmt and prepStmt use mechanisms that are not portable over encodings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.1.2.1
    • 10.1.3.1, 10.2.1.6
    • Test
    • None
    • z/OS , ibm142 ('Classic', 32 bit jvm)

    Description

      With zOS, with the classic 32 bit jvm, the tests derbynet/csPrepStmt and prepStmt.java fail because the insert with setAsciiStream of a byte array obtained from a new String.getBytes() (and/or the retrieval of that inserted value) is not ok. No error is returned, but the select shows no value.

      This is the section in the test csPrepStmt:
      -----------------
      ps.setString(10, "column11string");
      byte[] c11ba = new String("column11vcstring").getBytes();
      int len = c11ba.length;
      ps.setAsciiStream(11, new ByteArrayInputStream(c11ba),
      len);
      and the value is retrieved using an ResultSet.getString(#)
      --------------------------
      28 del
      < got row: 1 2 3 4 5.0 6.0 7.0 88.88 99.100 column11string
      column11vcstring column12lvcstring
      0123456789abcdef10111213202020 0123456789abcdef10111213
      0123456789abcdef10111213 xxxxxxFILTERED-TIMESTAMPxxxxx-04-12
      11:44:30.0
      28a28
      > got row: 1 2 3 4 5.0 6.0 7.0 88.88 99.100 column11string
      column12lvcstring 0123456789abcdef10111213202020
      0123456789abcdef10111213 0123456789abcdef10111213
      xxxxxxFILTERED-TIMESTAMPxxxxx-04-12 11:44:30.0
      --------------------
      (i.e. the string "column11vcstring" is not in the database)

      This needs to be replaced by a encoding-neutral (eg. fixed encoding) mechanism and the tests derbynet/prepStmt.java and csPrepStmt.java need to be checked for other non-portable
      code.

      Attachments

        1. Derby972.diff.txt
          2 kB
          Sunitha Kambhampati
        2. Derby972.stat.txt
          0.2 kB
          Sunitha Kambhampati

        Issue Links

          Activity

            People

              skambha Sunitha Kambhampati
              myrna Myrna van Lunteren
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: