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

Client differs from embedded when rs.updateInt overflows: 22015 vs 22003

    XMLWordPrintableJSON

Details

    • Deviation from standard, Embedded/Client difference

    Description

      stm.executeUpdate("create table t(i smallint)");
      stm.executeUpdate("insert into t values 1,2,3,4");

      ResultSet rs = stm.executeQuery("select i from t");

      rs.next();

      try {
      rs.updateInt(1, 100000);
      } catch (SQLException e) {
      // client: 22015 vs embedded 22003
      }

      According to the standard, 22015 should be used for INTERVALs ("interval field overflow"). 22003 seems more correct, the standard uses that for "numeric value out of range".

      Attachments

        1. derby-5533.diff
          56 kB
          Dag H. Wanvik
        2. derby-5533.stat
          1 kB
          Dag H. Wanvik
        3. derby-5533b.diff
          63 kB
          Dag H. Wanvik
        4. derby-5533b.stat
          1 kB
          Dag H. Wanvik
        5. derby-5533-repro.diff
          6 kB
          Dag H. Wanvik
        6. derby-5533-test.diff
          14 kB
          Dag H. Wanvik

        Issue Links

          Activity

            People

              dagw Dag H. Wanvik
              dagw Dag H. Wanvik
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: