Derby
  1. Derby
  2. DERBY-4965

Boolean to char conversion results in integer

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.7.1.1
    • Fix Version/s: 10.8.1.2
    • Component/s: JDBC
    • Labels:
      None
    • Issue & fix info:
      Release Note Needed, Repro attached
    • Bug behavior facts:
      Deviation from standard

      Description

      Seen when running the Java EE CTS on Derby 10.7.1.1. The following code results in "1" being printed, whereas the expected result is "true":

      PreparedStatement ps = c.prepareStatement("values cast(? as char(10))");
      ps.setObject(1, Boolean.TRUE, Types.CHAR);
      ResultSet rs = ps.executeQuery();
      rs.next();
      System.out.println(rs.getString(1));

      Same seen when using VARCHAR or LONGVARCHAR instead of CHAR, and when using setBoolean() instead of setObject().

      1. releaseNote.html
        5 kB
        Rick Hillegas
      2. releaseNote.html
        5 kB
        Rick Hillegas
      3. releaseNote.html
        5 kB
        Knut Anders Hatlen
      4. update-comments.diff
        2 kB
        Knut Anders Hatlen
      5. derby-4965-1c.diff
        12 kB
        Knut Anders Hatlen
      6. derby-4965-1b.diff
        9 kB
        Knut Anders Hatlen
      7. derby-4965-1a.diff
        6 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Gavin made changes -
          Workflow jira [ 12542133 ] Default workflow, editable Closed status [ 12801135 ]
          Knut Anders Hatlen made changes -
          Link This issue is related to DERBY-5788 [ DERBY-5788 ]
          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Rick Hillegas made changes -
          Fix Version/s 10.8.1.2 [ 12316362 ]
          Fix Version/s 10.8.1.1 [ 12316356 ]
          Rick Hillegas made changes -
          Fix Version/s 10.8.1.1 [ 12316356 ]
          Fix Version/s 10.8.1.0 [ 12315561 ]
          Rick Hillegas made changes -
          Attachment releaseNote.html [ 12475812 ]
          Rick Hillegas made changes -
          Attachment releaseNote.html [ 12472330 ]
          Knut Anders Hatlen made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Knut Anders Hatlen made changes -
          Attachment releaseNote.html [ 12471922 ]
          Knut Anders Hatlen made changes -
          Original Estimate 0h [ 0 ]
          Remaining Estimate 0h [ 0 ]
          Knut Anders Hatlen made changes -
          Attachment update-comments.diff [ 12469399 ]
          Knut Anders Hatlen made changes -
          Fix Version/s 10.8.0.0 [ 12315561 ]
          Issue & fix info [Repro attached, Patch Available] [Release Note Needed, Repro attached]
          Knut Anders Hatlen made changes -
          Issue & fix info [Repro attached] [Patch Available, Repro attached]
          Knut Anders Hatlen made changes -
          Attachment derby-4965-1c.diff [ 12468589 ]
          Knut Anders Hatlen made changes -
          Attachment derby-4965-1b.diff [ 12468586 ]
          Knut Anders Hatlen made changes -
          Attachment derby-4965-1a.diff [ 12468009 ]
          Knut Anders Hatlen made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Knut Anders Hatlen made changes -
          Assignee Knut Anders Hatlen [ knutanders ]
          Knut Anders Hatlen made changes -
          Field Original Value New Value
          Issue & fix info [Repro attached]
          Knut Anders Hatlen created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development