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

Embedded driver allows updateBytes() on BOOLEAN column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.7.1.1
    • 10.8.1.2
    • JDBC
    • None
    • Repro attached
    • Embedded/Client difference

    Description

      The following code inserts the value TRUE into the table T on the embedded driver:

      Statement s = c.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
      s.execute("create table t(b boolean)");
      ResultSet rs = s.executeQuery("select b from t");
      rs.moveToInsertRow();
      rs.updateBytes(1, "this is a test".getBytes());
      rs.insertRow();

      The client driver fails:

      java.sql.SQLException: An attempt was made to put a data value of type 'byte[]' into a data value of type 'BOOLEAN'.

      I believe the client driver is correct, and embedded should be changed to match it.

      Attachments

        1. derby-5063-1b.diff
          3 kB
          Knut Anders Hatlen
        2. derby-5063-1a.diff
          1 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              knutanders Knut Anders Hatlen
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: