Derby
  1. Derby
  2. DERBY-4706

Remove stale and potentially unused code Request.writeEncryptedScalarStream

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 10.7.1.1
    • Fix Version/s: 10.6.2.1, 10.7.1.1
    • Component/s: Network Client
    • Labels:
      None

      Description

      The code in net.Request.writeEncryptedScalarStream() is in a bad state, for instance:

      • it materializes the stream
      • it doesn't support streams longer than Integer.MAX_VALUE
        (this is fine for BLOB since Derby limits the LOB size to 2G-1, but for CLOBs the data stream may be longer since the length is expressed in characters)
      • in some error situations it causes a disconnect

      Since the security mechanisms required to run this code (SECMEC_EUSRIDDTA and SECMEC_EUSRPWDDTA) are apparently supported in the client but not in the network server, deleting it seems like a good option considering its state.

        Issue Links

          Activity

          Hide
          Kristian Waagan added a comment -

          Attached patch 1a, which removes a number of methods in Request.
          The patch also makes the client driver throw an exception in case the code path is enabled.
          Note that though the auxiliary methods are okay (and can be revived if required), the method writeEncryptedScalarStream should be reimplemented if the functionality is needed.

          Committed to trunk with revision 956569.

          Show
          Kristian Waagan added a comment - Attached patch 1a, which removes a number of methods in Request. The patch also makes the client driver throw an exception in case the code path is enabled. Note that though the auxiliary methods are okay (and can be revived if required), the method writeEncryptedScalarStream should be reimplemented if the functionality is needed. Committed to trunk with revision 956569.
          Hide
          Kristian Waagan added a comment -

          I do plan to back-port this issue after verification, because the client-side only fix for DERBY-1595 depends on it (just for a clean merge, not functionally).

          Show
          Kristian Waagan added a comment - I do plan to back-port this issue after verification, because the client-side only fix for DERBY-1595 depends on it (just for a clean merge, not functionally).
          Hide
          Kristian Waagan added a comment -

          Backported to 10.6 with revision 957498.
          FYI, the patch doesn't currently merge cleanly with the 10.5 branch.

          Show
          Kristian Waagan added a comment - Backported to 10.6 with revision 957498. FYI, the patch doesn't currently merge cleanly with the 10.5 branch.
          Hide
          Kristian Waagan added a comment -

          Closing issue.

          Show
          Kristian Waagan added a comment - Closing issue.

            People

            • Assignee:
              Kristian Waagan
              Reporter:
              Kristian Waagan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development