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

          No work has yet been logged on this 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