Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-525

Batched Queries failing to be validated by Hibernate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0, 2.1.1
    • Fix Version/s: 1.6.5, 2.1.2
    • Component/s: batch
    • Labels:
      None

      Description

      PreparedStatement st = connection.prepareStatement("delete from temp_t where col1 = ?");
      st.setInt(1, 0);
      st.addBatch();
      st.setInt(1, 1);
      st.addBatch();
      int[] ints = st.executeBatch();

      When I run Batched Queries in 1.6.4 or 2.0.3 I got two results, exactly what I expect;
      ints =

      {1, 1}

      When the same code ran in 2.1.0 or 2.1.1
      I got unexpected first value -3, so that my array looks like this:
      ints = {-3, 1, 1}

      In case if newer driver used with Hibernate, we face fail, since it traverse through whole array and throw Exception on negative values - it's in this class

      org.hibernate.engine.jdbc.batch.internal.BatchingBatch.checkRowCounts()

        Attachments

          Activity

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            yerenkow Oleksandr Ierenkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration