Derby
  1. Derby
  2. DERBY-3705

In Net Client mode, negative values for stream length are accepted without an exception for PreparedStatement.setAsciiStream()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.4.1.3, 10.5.1.1
    • Fix Version/s: 10.5.1.1
    • Component/s: Network Client
    • Labels:
      None
    • Environment:
      Windows XP SP2, Derby trunk SVN checkout
    • Urgency:
      Normal

      Description

      This is related to Cloudscape bug 4250.

      Pass negative length as the stream length for various setXXXStream methods should throw an exception. But in Net Client mode, passing a negative value as stream length to PreparedStatement.setAsciiStream() doesn't throw an exception.

      e.g. //from store/StreamingColumn
      PreparedStatement ps = prepareStatement("insert into "
      + "testLongVarCharInvalidStreamLength11 values(?, ?, ?)");
      ps.setInt(1, 100);
      try

      { println("===> testing using setAsciiStream with -2 as length"); ps.setAsciiStream(2, fileIn, -2); // should throw exception here but doesn't. }

      This issue has been fixed for embedded mode, but not for client mode.

      1. derby-3705.diff
        2 kB
        Suran Jayathilaka
      2. derby-3705-2.diff
        4 kB
        Suran Jayathilaka
      3. derby-3705-2b.diff
        4 kB
        Kristian Waagan

        Issue Links

          Activity

          Suran Jayathilaka created issue -
          Suran Jayathilaka made changes -
          Field Original Value New Value
          Assignee Suran Jayathilaka [ suranjay ]
          Suran Jayathilaka made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Suran Jayathilaka made changes -
          Attachment derby-3705.diff [ 12383312 ]
          Suran Jayathilaka made changes -
          Derby Info [Patch Available]
          Kristian Waagan made changes -
          Affects Version/s 10.5.0.0 [ 12313010 ]
          Priority Critical [ 2 ] Minor [ 4 ]
          Suran Jayathilaka made changes -
          Attachment derby-3705-2.diff [ 12383570 ]
          Suran Jayathilaka made changes -
          Link This issue blocks DERBY-3663 [ DERBY-3663 ]
          Kristian Waagan made changes -
          Attachment derby-3705-2b.diff [ 12383749 ]
          Kristian Waagan made changes -
          Fix Version/s 10.5.0.0 [ 12313010 ]
          Derby Info [Patch Available]
          Suran Jayathilaka made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Myrna van Lunteren made changes -
          Affects Version/s 10.5.1.1 [ 12313771 ]
          Affects Version/s 10.5.0.0 [ 12313010 ]
          Fix Version/s 10.5.1.1 [ 12313771 ]
          Fix Version/s 10.5.0.0 [ 12313010 ]
          Kristian Waagan made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Link This issue blocks DERBY-3663 [ DERBY-3663 ]
          Gavin made changes -
          Link This issue is depended upon by DERBY-3663 [ DERBY-3663 ]
          Gavin made changes -
          Workflow jira [ 12432439 ] Default workflow, editable Closed status [ 12802343 ]

            People

            • Assignee:
              Suran Jayathilaka
              Reporter:
              Suran Jayathilaka
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development