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

Different byte to boolean conversion on embedded and client

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.7.1.1
    • 10.7.1.1
    • JDBC
    • None
    • Repro attached
    • 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".

      Attachments

        1. derby-4889-01-aa-removeSpecialCase.diff
          2 kB
          Richard N. Hillegas

        Issue Links

          Activity

            People

              rhillegas Richard N. Hillegas
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: