Derby
  1. Derby
  2. DERBY-4889

Different byte to boolean conversion on embedded and client

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.7.1.1
    • Fix Version/s: 10.7.1.1
    • Component/s: JDBC
    • Labels:
      None
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      Embedded/Client difference

      Description

      The following code prints "true" with the embedded driver and "false" with the client driver:

      PreparedStatement ps = c.prepareStatement("values cast(? as boolean)");
      ps.setByte(1, (byte) 32);
      ResultSet rs = ps.executeQuery();
      rs.next();
      System.out.println(rs.getBoolean(1));

      If setByte() is replaced with setInt(), they both print "true".

        Issue Links

          Activity

          Gavin made changes -
          Workflow jira [ 12526166 ] Default workflow, editable Closed status [ 12800264 ]
          Rick Hillegas made changes -
          Affects Version/s 10.7.1.1 [ 12315564 ]
          Affects Version/s 10.7.1.0 [ 12314971 ]
          Fix Version/s 10.7.1.1 [ 12315564 ]
          Fix Version/s 10.7.1.0 [ 12314971 ]
          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Knut Anders Hatlen made changes -
          Fix Version/s 10.7.1.0 [ 12314971 ]
          Rick Hillegas made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Rick Hillegas made changes -
          Assignee Rick Hillegas [ rhillegas ]
          Rick Hillegas made changes -
          Attachment derby-4889-01-aa-removeSpecialCase.diff [ 12459077 ]
          Knut Anders Hatlen made changes -
          Link This issue relates to DERBY-4891 [ DERBY-4891 ]
          Knut Anders Hatlen made changes -
          Field Original Value New Value
          Bug behavior facts [Embedded/Client difference]
          Knut Anders Hatlen created issue -

            People

            • Assignee:
              Rick Hillegas
              Reporter:
              Knut Anders Hatlen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development